3 ms·
MyPy has worked very well for our small team of backend developers. It's already production-ready in my opinion, but it still lacks some modern type-system fea
by ledauphin 7y ago
MyPy has worked very well for our small team of backend developers.
It's already production-ready in my opinion, but it still lacks some modern type-system features that you may be used to from other languages. Ironically, for instance, before Protocols were introduced (and they're still not part of Python core), there was no way to express structural subtyping in MyPy (for a duck-typed language!). And I'd argue they've made the same mistake (and a worse one in some ways) with TypedDict, which is a strict/nominal set rather than an a structural one, making it impossible to use on many real-world collections that have key-value pairs that you want to forgo typing for whatever reason.
Still, Python with MyPy is a huge step up from Python without, and mypyc looks interesting as well.