4 ms·
use mypy? it can enforce the type hints.
by _dain_ 4y ago
use mypy? it can enforce the type hints.
- maxbond 4y agoMyPy is awesome and will make you a more productive programmer and will make your application more robust. But I agree that Python types are "weak ass". It's not a particularly ergonomic type system to use, and it's more difficult to express complex types than is worth it for the sometimes questionable benefit. 3.10 does add unions using | which is nice, and I expect the type system will get better, but I share these frustrations.