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

It makes sense I guess mostly if Python doesn't have good third party library typechecking... But how would beartype catch it? I mean a runtime error is a runtime error... You trade one for another?


Beartype does not catch errors, it checks before they happen.

Basically it's pure python ultra optimized code that calls "isinstance(a, b)" all the time everywhere. If there is a mismatch it crashes.

Note that you can also set it to warn instead of crash.




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

Search: