代码如下图,请问foo这个函数定义时候的a:int是什么意思?我在看直播的时候,主播说是可以限制形参a的类型,然而现在看来并不是这样。怎么回事呢?谢谢!
https://docs.python.org/3/library/typing.html
Python 3.5.1 new type hint syntax. It can’t be restricted, it can only be prompted.
https://docs.python.org/3/library/typing.html
Python 3.5.1 new type hint syntax.
It can’t be restricted, it can only be prompted.