The full grammar for function annotations can be found in PEP 3107 (see Resources for a link).
函数注释的完整语法可以在PEP 3107(相关链接,请参见参考资料)内找到。
Left to themselves, function annotations are meaningless-that is, they aren't processed unless a third-party library does so.
就其本身而言,函数注释是无意义的—即,除非第三方库对之进行处理,否则它们不会被处理。
The purpose of function annotations is to standardize the way a function's parameters or return values are annotated. The syntax for function annotations is
函数注释的作用是为了标准化函数参数或返回值被注释的方式。
应用推荐