Skip to content

Commit 0f90f81

Browse files
📝 更新Python文档,增强标准库推荐与学习建议
- 在标准库推荐中增加了对`random`、`math`和`decimal`的详细说明,提升了文档的实用性。 - 在Python cookbook部分新增了学习建议,鼓励用户通过实践和贡献来提升技能。
1 parent f57047f commit 0f90f81

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

docs/docs/选择编程语言/Python/1数字.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,6 @@ print(sum([1,2,3],10)) # 16
627627

628628
## 标准库推荐
629629

630-
- random: 生成伪随机数
631-
- math: 数学函数
632-
- decimal: 十进制定点和浮点算术
630+
- random: 生成伪随机数,支持从区间中取整数/浮点数、打乱序列、按权重抽样等,适合模拟、简单游戏、随机测试等场景(注意不是密码学安全随机数)。
631+
- math: 提供底层、接近 C 标准库的一组数学函数,例如三角函数、指数/对数、取整、无穷大和 NaN 常量等,主要面向浮点数运算。
632+
- decimal: 提供十进制定点和浮点算术,支持任意精度和可配置的舍入规则,适合财务、货币等对小数精度要求极高的场景。

docs/docs/选择编程语言/Python/99练习.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,4 +832,10 @@ p.color_percent()
832832
833833
### Python cookbook
834834
835-
更多练习,请访问[Python cookbook](https://python-cookbook.readthedocs.io/zh_CN/latest/index.html)
835+
更多练习,请访问[Python cookbook](https://python-cookbook.readthedocs.io/zh_CN/latest/index.html)
836+
837+
如何成为某个领域的专家?选一个你愿意啃数年的主线:比如 Python 后端 / 数据分析 / AI 应用 / 工具链。
838+
839+
持续做 真正有交付结果的东西:开源项目、被人在用的小工具、线上服务、课程/文档。
840+
841+
如果有一天,你遇到了一些Python的BUG,可以去[Python的官方仓库](https://github.com/python/cpython)为它们提交PR,说明你已经走了很远的路了。

docs/docs/选择编程语言/Python/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ GCC 版本:13.3.0
1414

1515
考虑到<HoverText text="AI编程的发展趋势" explanation="AI对绝大多数技术都能达到初级至中级工程师的水平"/>。当下的专业编程从业者应该对常用技术更加深入底层达到中高级水准。
1616

17+
本教程涵盖所有内置函数、内置关键字、内置异常以及一半以上的Python标准库。
18+
1719
## 环境管理没有银弹
1820

1921
### 结论在前

0 commit comments

Comments
 (0)