Hacker News new | past | comments | ask | show | jobs | submit login

I agree. There are usable third-party runtime type checkers though. I like Beartype, which lets you add a decorator @beartype above any function or method, and it’ll complain at runtime if arguments or return values violate the type hints.

I think runtime type checking is in some ways a better fit for a highly dynamic language like Python than static type checking, although both are useful.




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

Search: