Settings

Theme

Ask HN: mypy is used in production?

2 points by h_mirin 3 years ago · 1 comment · 1 min read


I'm considering using Python to develop a somewhat complex web application. I think it would benefit from stricter type-checking.

I'm curious, is anyone using mypy in a production environment? What are your thoughts on introducing mypy from the beginning of development? Are you for or against it?

cpburns2009 3 years ago

I used mypy when I first started adding type annotations. I've found it's more convenient to rely on an IDE to flag type errors (PyCharm in my case). I use types extensively now. TypedDict and NamedTuple make documenting and enforcing structures so much more reliable, regardless of whether you choose mypy or not. Mypy will have the latest and greatest type hinting features because it is an official Python project.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection