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

I'm not sure I understand the benefit. We already have type hints, and for more complicated tests, assert. Both can be ignored in production.

EDIT: ok, I get that they provide some additional benefits such as checking for deadlock or memory leaks. Neat.



Assertions, combined with highly granular code coverage (which most [all?] Python coverage libraries can only do at a line level, so this isn't really sufficient), can almost get you to a point where you're confident that all your asserted invariants are true for all inputs.

Statically checking/proving that those invariants will hold, regardless of inputs, is a huge step up in that level of confidence.




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

Search: