Mypy 0.3 Released – optional static type checker for Python
mypy-lang.blogspot.com
mypy-lang.blogspot.com
Thanks Jukka!
Wouldn't be better to concentrate on 3.x only and full async support?
Yeah, probably maintaining large, legacy codebases, which are underdocumented and undertested but over-architected to compensate... And such people would immediately and directly benefit from an optional static type-checker. So maybe it's for them?
> People that use python 2 generally maintain existing code base.
maintain being a key word there, finding bugs before they become a problem is always a good thing.
- - -
Also python 2 is maintained beyond security patches, but only by third parties: the core developers won't be adding new features, but third parties are welcome to spend time and effort to backport python 3 features to python 2 (as long as it isn't an incompatible change for py2)
At least that is what my understanding of the situation is
Apart from the sweet sweet cash though, missing Python 2 support makes it harder for people to take you as a dependency. I think it's similar to why a lot of Python projects put in the effort to add Windows support, even if only a tiny fraction of their users actually run Windows. If your project doesn't support Windows/Python 2, and my project does, I can't take you as a dependency. If my project might ever in the future support Windows/Python 2, I can't take you as a dependency. That's a huge drag on adoption.
I sincerely hope that in five years, supporting `async`/`await` will be more important for adoption than supporting Python 2.
My experience is that most developers who personally use nix OSes vastly* underestimate the number of Windows developers out there.
def foo(n: int):
pass
def bar():
foo("123")
It does detect this mismatch: def foo(n: int):
pass
foo("123") def foo(n: int):
pass
def bar() -> None:
foo("123")
>> main: note: In function "bar":
>> main:4: error: Argument 1 to "foo" has incompatible type "str"; expected "int"Later I did find a documentation benefit for certain situations.