代码如下图,请问foo这个函数定义时候的a:int是什么意思?我在看直播的时候,主播说是可以限制形参a的类型,然而现在看来并不是这样。怎么回事呢?谢谢!
https://docs.python.org/3/library/typing.html
Python 3.5.1 nouvelle syntaxe d'indication de type. Il ne peut pas être restreint, il peut seulement être invité.
https://docs.python.org/3/library/typing.html
Python 3.5.1 nouvelle syntaxe d'indication de type.
Il ne peut pas être restreint, il peut seulement être invité.