4 ms·
They are not pointless if you run code through mypy, an optional static type checker for Python. Most Python code does not use annotations, but that's because a
by Bostonian 7y ago
They are not pointless if you run code through mypy, an optional static type checker for Python. Most Python code does not use annotations, but that's because annotations are a relatively new feature and because Python programmers are not used to using annotations. Maybe beginners should get in the habit of using annotations when a function only makes sense specific argument types.