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

Can you give an example of the Python you're writing that requires assertions to be functional? My guess is that you're using assertions where raising and catching exceptions would be more appropriate.

In c, checking memory allocation. In python, checking that sql queries succeeded. The point is there's always something that should _never_ fail in real life but I feel better with an explicit check on it. I figure the ease in coding makes up for telling people (not that it's a high probability of this happening) to not compile asserts out.

It just bugs me to no end how people try to make the easiest forms of error checking difficult.

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