3 ms·
Simple type annotations can be entirely in comments, but for more complex usage you might want to execute code, like type aliases: MyContainer = List[int] O
by duckerude 6y ago
Simple type annotations can be entirely in comments, but for more complex usage you might want to execute code, like type aliases:
MyContainer = List[int]
On top of that, the typing module was also backported to Python 3 versions before 3.5, where you do have annotation syntax.