Re:Python type hints may not be not for me in practice
by wenc on Wednesday November 27, 2024 @11:35AM
(#42257344)
They are verbose but correct. I've caught some errors this way.
I usually don't think of None as a potential return value (= voids in C) but the LSP code analysis usually picks up on code paths that don't return a value.
I don't find Python's typing valuable for Jupyter type explorations, but they're immensely valuable for catching little issues in production code.
Are they correct? If they're correct (even though they are a superset of the actual intended type) then what's the problem?
At worst, it's like not having type checks for that particular package.