3 ms·
The language itself supports annotations, without any actual typechecking. You use http://mypy-lang.org/ http://mypy-lang.org/ to get the static checking.
by bpicolo 9y ago
The language itself supports annotations, without any actual typechecking. You use http://mypy-lang.org/ http://mypy-lang.org/ to get the static checking.
- shalabhc 9y agoThere is also Google's pytype: https://github.com/google/pytype https://github.com/google/pytype
- bpicolo 9y agoThat looks like it adds types rather than checks?
- shalabhc 9y agoIt does both. I can do some inference but definitely does type checking. Here's a Pycon talk from last year about pytype: https://youtu.be/IDm_YIQihhs https://youtu.be/IDm_YIQihhs
- bpicolo 9y agoIt needs severely more documentation, heh. Why would I use it over mypy, which appears to have a lot more community investment, thorough docs, and is somewhat official? It also doesn't support python3.6 so it doesn't know about format strings =/
- shalabhc 9y agopytype might work better in some cases, because it can do inference. But yes, it needs more docs.