debugging code
Paul Sweeney
reverse.ku.oc.issolok at nothypgnal.delrest.co.uk
Wed Apr 28 05:12:46 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.
I agree with Rick on using __debug__ not your own variables, as suggested
elsewhere
> You can only set __debug__ through the use of -O or -OO.
There is a typo here (but all the examples that followed were correct), You
can only set __debug__ *to False* through the use of -O or -OO.
More information about the Python-list
mailing list