Skip to content

类型注解 ​

type annotation / type hint别名:类型注解、type annotation / type hint、type annotationPython 基础已核验 · 2026-10-13

定义 ​

为参数、返回值或变量标注预期类型,供类型检查器和其他工具使用。

解释 ​

Python 本身通常不强制校验;框架可读取注解进行运行时校验。

来源 ​

官方文档/规范/论文;核验 2026-10-13。


在 GitHub 查看源条目