Skip to content

Commit c67009d

Browse files
authored
Merge pull request #15 from QuantEcon/translation-sync-2026-03-26T04-55-09-pr-503
🌐 [translation-sync] Update redirect URLs for mypy and jax docs
2 parents 7b3fc41 + 7143d9f commit c67009d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.translate/state/python_advanced_features.md.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
source-sha: f791129259d11c138d7662c88f994c9d5ebaa875
2-
synced-at: "2026-03-25"
1+
source-sha: dcf952a9a05ba3bf8763c21d89dac3c7480b8d45
2+
synced-at: "2026-03-26"
33
model: claude-sonnet-4-6
44
mode: UPDATE
55
section-count: 7

lectures/python_advanced_features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,14 +583,14 @@ add(1.5, 2.7)
583583

584584
1. **可读性**:类型提示使函数签名具有自文档化效果。读者可以立即了解函数期望的输入类型和返回类型。
585585
2. **编辑器支持**:VS Code 等 IDE 利用类型提示提供更好的自动补全、错误检测和内联文档功能。
586-
3. **错误检查**[mypy](https://mypy.readthedocs.io/)[pyrefly](https://pyrefly.org/) 等工具通过分析类型提示,在*运行代码之前*就能发现错误。
586+
3. **错误检查**[mypy](https://mypy.readthedocs.io/en/stable/)[pyrefly](https://pyrefly.org/) 等工具通过分析类型提示,在*运行代码之前*就能发现错误。
587587
4. **LLM 生成的代码**:大型语言模型经常生成带有类型提示的代码,因此理解其语法有助于阅读和使用它们的输出。
588588

589589
### 科学 Python 中的类型提示
590590

591591
类型提示与 {doc}`性能需求 <need_for_speed>` 的讨论密切相关:
592592

593-
* [JAX](https://jax.readthedocs.io/)[Numba](https://numba.pydata.org/) 等高性能库依赖于了解变量类型来编译快速的机器码。
593+
* [JAX](https://docs.jax.dev/en/latest/)[Numba](https://numba.pydata.org/) 等高性能库依赖于了解变量类型来编译快速的机器码。
594594
* 虽然这些库在运行时推断类型,而不是直接读取 Python 类型提示,但*概念*是相同的——显式的类型信息能够实现优化。
595595
* 随着 Python 生态系统的发展,类型提示与性能工具之间的联系预计将进一步加强。
596596

0 commit comments

Comments
 (0)