Verifying assertion failures

Courageous jkraska1 at san.rr.com
Sat May 19 12:27:16 EDT 2001


>> >>> try:
>> ...   assert 0 == 1
>> ... except AssertionError, e:
>> ...   print e
>> ...
>> 0 == 1
>
>Why do you want to do that?  Usually, you use assertions for things you
>believe are necessarily true. 

but-that-still-leaves-being-able-to-catch-the-assertion-when-it-fails ly-yrs C




More information about the Python-list mailing list