conditional running of code portion

JW Huang ngcbmy at gmail.com
Sun Aug 5 00:16:04 EDT 2012


Hi,

How can I implement something like C++'s conditional compile.

if VERBOSE_MODE: print debug information
else: do nothing

But I don't want this condition to be checked during runtime as it
will slow down the code.

Thanks in advance.



More information about the Python-list mailing list