How to disable assert statements inside a module?

Skip Montanaro skip at pobox.com
Sun Mar 10 16:09:29 EST 2002


    Pearu> So, I would like to disable the assert statements in one module
    Pearu> while in others, that are under development, assert statements
    Pearu> are enabled.  Is it possible? I am using Python 2.2.

This comes to mind:

    s/assert /pass; #assert/

:-)

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)
"As often happens in Net communities, people find all kinds of energy to
compose incisive criticisms of the threads and postings of other members,
when they could be directing that energy towards brilliant new threads and
postings of their own." - Tom Neff




More information about the Python-list mailing list