(no title)
oselhn
|
6 years ago
Because it is not used by runtime. Mypy is just linter which adds additional restrictions on code which are not enforced by interpreter. You can have false positives so correct python code must be fixed to pass linter checks. In my opinion if you need static type checks you should use statically typed language and not hurt your coding speed by such partial solution. Also majority of python libraries do not use type annotations so you are limited to your code.
feanaro|6 years ago
I agree that statically typed languages are preferable. I don't consider static typing optional so I'm glad Python is growing a solution that supports it, though.
In my experience, mypy works surprisingly well. It doesn't hurt my coding speed at all but enhances it to levels that were not previously possible in Python, due to a lack of typing. False positives are rather rare.