Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As as understand it, those hints are only hints to human readers. There is no standard tooling that actually does any type checking, either statically or dynamically (although such tooling can be built using Python's reflective capabilities). So while adding the hints may be valuable documentation, it wouldn't solve the problem of "showing how types protect against errors in the Adversity section".


Like the other commenter said, check out mypy.

http://mypy-lang.org/


There's mypy.


Sorry, by "no standard tooling" I meant "no standard tooling" in the sense of no tooling in the standard Python distribution.


Seeing that mypy is under github.com/python/, you can easily argue that it is in fact the standard tool for type-checking python code.


And also that the second highest contributor is Guido van Rossum (https://github.com/python/mypy/graphs/contributors).


Fair enough, those are reasonable arguments the grandparents could (and should) have made.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: