资讯

It’s not entirely new… If we write: In Python 3.9 — it works. That is because the new parser enabled this syntax, despite it not being officially supported until Python 3.10. More typing ...
For some time now, Python developers have been able to “annotate” names with type information. With Python 3.5, type hints officially became part of the language (see PEP 484).