DEV Community


Discussion on: The Comprehensive Guide to mypy

artalus profile image

I think that's exactly what you need.

Totally! The ultimate syntactic sugar now would be an option to provide automatic "conversion constructors" for those custom types, like def __ms__(seconds: s): return ms(s*1000) - but that's not a big deal compared to ability to differentiate integral types semantically.

Thank you :)

Thread Thread
tusharsadhwani profile image
Tushar Sadhwani Author

Knowing that it's Python, I'm pretty sure that's easy to patch in on your side as well :)