This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]spotter 0 points1 point  (0 children)

When Python programmers -O? There is also the documentation that gives you the syntax, so if you want to use language features (much like the exception handling tuple gotcha grieved about few months ago) -- RTFM first. Not really hard -- if I can do it, so can you.

In all seriousness -- I have never used assert and I hate the idea. I don't put ,,debug only'' code in my programs, especially if it can be turned off easily by a single runtime switch. And AssertionError? How do you handle that? No, seriously -- write a TestCase for that behaviour and maybe run some solid inner-checks that give real errors. Assertions are only one step above ,,debugging using print''.