Anything equivalent to cassert in C++?

Peng Yu pengyu.ut at
Tue Nov 17 22:19:56 CET 2009

There are some assertion code (testing if a condition is false, if it
is false, raise an Error object) in my python, which is useful when I
test my package.  But such case would never occur when in the produce
code. If I keep them in if statement, it will take some runtime. I'm
wondering what is the practice that take care of the assertion code in

More information about the Python-list mailing list