They are not checked during runtime and, as such, they are meaningless.
For a while, I was open to the idea. "Better have *some* information
about types than nothing at all!" But I was wrong. They are harmful.
We had an application crashing today. While debugging, I read through
(someone else's) code, which used type hints everywhere. I knew these
guys were fans of type hints, so I (subconsciously) assumed they placed
those type hints with great care and I also assumed the hints were
correct. These guys also use full-blown IDEs, not just plain Vim like
me, so they should have seen warnings.
This was a huge red herring. It took me a while to even question the
correctness of those hints. Turned out, some hints were correct, others
were not. It was chaotic.
So, not only does Python itself not check those hints in any meaningful
way, they also caused additional confusion on my end. It would have been
better if there had been no type hints in the first place.
And that's just me. The next person who runs into this problem will have
to make this experience *again*, because I probably cannot tell her
about this in advance.