Re:Python’s “type hints” are a bit of a disappointment to me
by kadoban on Thursday April 21, 2022 @10:13PM
(#31117481)
The types on stitty-documented code often do depend on the types actually being checked though. Otherwise you need to author to be diligent in their types, but if they're bad in their other docs, that seems unlikely.
Re:Python’s “type hints” are a bit of a disappointment to me
by tjoff on Friday April 22, 2022 @02:09AM
(#31118735)
You don't think that "the author thought that this function would return X, but I got Y" is useful?
Re:Python’s “type hints” are a bit of a disappointment to me
by kadoban on Friday April 22, 2022 @11:37AM
(#31122938)
Only for archeological, and maybe sometimes psychological investigations of code.
Re:Python’s “type hints” are a bit of a disappointment to me
by tjoff on Saturday April 23, 2022 @05:07AM
(#31132577)
That line of reasoning doesn't make any sense to me.
If the author / last person who touched the code misunderstood it then there is a 100% chance there is a bug here.
Knowing that off the bat is quite helpful. And it also tells something about the code quality if it is a common occurrence.
Re:Python’s “type hints” are a bit of a disappointment to me
by smitty1e on Tuesday April 26, 2022 @04:37PM
(#31172848)
Could be an indicator to look up the file in git log.
Which need would send me back to pypi to look at other prior art, if possible.
I agree this is useful, but to me the most useful feature of types are the self-documentation. It's crazy the difference between a non-typed library with shitty documentation vs a typed library with shitty documentation.