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

In C it's easy enough to define your own macro (I like to call it "require") which behaves similarly, but doesn't "abuse" assert. Not so in Python, though.

It is silly to make the most, convenient form of error checking subtly wrong, and then castigate programmers as lazy for using it.

yeah, the problem is assert is already such a fine name. why, oh why, must it be confined to debug only builds :-(

well it doesn't have to be, it's just a convention -- feel free to violate it, you just have to deal w/ your usage being a bit surprising, and lectures like the original blog post. :)

Applications are open for YC Winter 2018

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