Document -OO; "unsafe" optimization that removes docstrings.

Marc-Andre Lemburg.
This commit is contained in:
Guido van Rossum 1999-01-28 15:07:47 +00:00
parent bf07b29c04
commit 6b86a42c7f
2 changed files with 11 additions and 1 deletions

View file

@ -1925,6 +1925,15 @@ When \code{-O} is used, \emph{all} bytecode is optimized; \code{.pyc}
files are ignored and \code{.py} files are compiled to optimized
bytecode.
\item
Passing two \code{-O} flags to the Python interpreter (\code{-OO})
will cause the bytecode compiler to perform optimizations that could
in some rare cases result in malfunctioning programs. Currently only
\code{__doc__} strings are removed from the bytecode, resulting in more
compact \file{.pyo} files. Since some programs may rely on having
these available, you should only use this option if you know what
you're doing.
\item
A program doesn't run any faster when it is read from a
\file{.pyc} or \file{.pyo} file than when it is read from a \file{.py}