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

This is really useful. I've been coding python projects for a few years now and was never quite sure how/when to use them. You'd run into assert when unit testing, but not that much elsewhere. This makes it clearer, I like this quote : Don't use assert for checking anything that you expect might fail in the ordinary use of your program. Assertions are for extraordinary failure conditions.



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: