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

Similarly python in optimised mode with -O or -OO flags will disable asserts.

I see asserts as a less temporary version of print() based debugging. Sometimes very useful as a quick and dirty fix, but 9 times out of 10 you’re better off with some combination of a real debugger, unit tests, tracing/logging, and better typing or validation.



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

Search: