The full grammar for function annotations can be found in PEP 3107 (see Resources for a link).
函数注释的完整语法可以在PEP 3107(相关链接,请参见参考资料)内找到。
Function annotations associate expressions with parts of a function, such as parameters, at compile time.
函数注释会在编译时将表述与函数的某些部分(比如参数)相关联。
Left to themselves, function annotations are meaningless-that is, they aren't processed unless a third-party library does so.
就其本身而言,函数注释是无意义的—即,除非第三方库对之进行处理,否则它们不会被处理。
应用推荐