Control of __doc__ strings

Alex Martelli aleaxit at yahoo.com
Tue Jan 23 07:05:55 EST 2001


"Terry Hancock" <hancock at earthlink.net> wrote in message
news:mailman.980197704.24948.python-list at python.org...
    [snip]
> (Comments are stripped out during byte-compilation,
> whereas doc strings are kept at run time).
>
> Does python have a way to shut off a piece of
> code during byte-compiling (the way that a

Passing the -OO switch to the Python executable will
ask it to remove docstrings from the resulting
compiled files (.pyo), as well as doing a few other
minor optimizations which -O by itself would also do.


Alex






More information about the Python-list mailing list