4 ms·
I'm confused, type annotations is not supported in Py 2 anyways, and if you're gonna use type comments a la `# type: list[int]` then it doesn't matter really, d
by ehsankia 6y ago
I'm confused, type annotations is not supported in Py 2 anyways, and if you're gonna use type comments a la `# type: list[int]` then it doesn't matter really, does it?
- duckerude 6y agoSimple 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.