String Exceptions (PEP 352)

infidel saint.infidel at gmail.com
Thu Apr 27 10:30:46 EDT 2006


You could also use the "assert" statement:

>>> if foo and bar:
... 	assert i <= 10, "if foo and bar then i must not be greater than
10"
...




More information about the Python-list mailing list