debugging code
beliavsky at aol.com
beliavsky at aol.com
Wed Apr 28 10:58:39 EDT 2004
Rick Ratzel <rick.ratzel at magma-da.com> wrote in message news:<408ee541$0$46510$39cecf19 at news.twtelecom.net>...
> Python defines __debug__ to True by default, and False when
> optimizations are enabled...meaning you can enable/disable code without
> having to define/undefine vars ahead of time and without having to
> change it prior to deployment. This is how the "assert" statement
> works. You can only set __debug__ through the use of -O or -OO.
<SNIP>
Thanks -- I will take your suggestion. Where are the Python command
line options like -O and -OO documented? Typing 'python -h' just gives
me
-O : optimize generated bytecode (a tad; also PYTHONOPTIMIZE=x)
-OO : remove doc-strings in addition to the -O optimizations
More information about the Python-list
mailing list