[Python-ideas] Efficient debug logging

Victor Stinner victor.stinner at gmail.com
Thu Feb 16 08:23:13 EST 2017

2017-02-16 13:55 GMT+01:00 M.-A. Lemburg <mal at egenix.com>:
>  1. you don't need a preprocessor for this: simply put your
>     logging code into an "if __debug__:" block:

The problem with -O is that it also disables assertions, whereas you
may want to keep them at runtime on production for good reasons.


More information about the Python-ideas mailing list