1.6 KiB
1.6 KiB
id, title, type, domain, stack, tags, week
| id | title | type | domain | stack | tags | week | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| python.python.index | Python 语言 | index | python |
|
|
|
Python 语言
AI 应用 / Agent 岗位的主力语言。你已经会 JavaScript / TypeScript,学 Python 的重点不是从零学编程,而是对照差异:语法、数据结构、类型标注、异常、包管理和测试的“Python 写法”,以及一些和 JS 直觉相反的坑(可变默认参数、浮点金额、导入路径)。
学习路线
| 顺序 | 课程 | 级别 | 预计 |
|---|---|---|---|
| 1 | 给 JS 开发者的 Python:语法、数据结构、推导式、函数、类 | 基础 | 3 小时 |
| 2 | 类型标注、dataclass、异常和上下文管理器、pytest | 基础 | 3 小时 |
| 3 | 工程化:虚拟环境、uv / pip、项目结构、导入、日志和配置 | 基础 | 2 小时 |
企业场景
面试题
示例代码
- examples/reconcile:CSV 对账(Decimal 金额、dataclass、生成器、日志、异常)+ pytest 测试,只用标准库
在 16 周计划中
官方资料
- Python 官方教程(中文):https://docs.python.org/zh-cn/3/tutorial/
- typing 模块:https://docs.python.org/zh-cn/3/library/typing.html
- pytest:https://docs.pytest.org/
- uv:https://docs.astral.sh/uv/