Tests aren’t enough: Case study after adding type hints to urllib3
I love static typing/type hints if for only 1 thing - code maintenance.<p>Even code I wrote six months ago.<p>Not having to dig through 6 functions deep to try to figure out whether "person" is a string, or an object, and if it's an object what attributes it has on it etc. is huge. And not to mention that some clever people decide - hey, if you pass a string I'll look up the person object - so you can pass an object or a string - which makes all sorts of convoluted code paths when someone else was looking at "person" and only saw one type so now their function doesn't work on both types etc.<p>I hate having to waste time figuring out the type of every variable and hold it in my head every single time I read a piece of code.