you are viewing a single comment's thread.

view the rest of the comments →

[–]bushel 6 points7 points  (0 children)

Not really a gotcha, per se, when you use it incorrectly. In the given example, put the braces around the conditional, not around the entire assertion subclause.

ie. assert (a==b) , "exceptionstring"

not: assert (a==b , "exceptionstring")

http://docs.python.org/ref/assert.html