diff options
author | Guido van Rossum <guido@python.org> | 1999-01-28 15:07:47 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-01-28 15:07:47 (GMT) |
commit | 6b86a42c7f8786f8446d5a48db406282f18ec06a (patch) | |
tree | f89a66d9345ee5ca953c64b65d23bb30cb1b005a /Doc/tut | |
parent | bf07b29c04de9e9424b6adb1fe50a1604e43a784 (diff) | |
download | cpython-6b86a42c7f8786f8446d5a48db406282f18ec06a.zip cpython-6b86a42c7f8786f8446d5a48db406282f18ec06a.tar.gz cpython-6b86a42c7f8786f8446d5a48db406282f18ec06a.tar.bz2 |
Document -OO; "unsafe" optimization that removes docstrings.
Marc-Andre Lemburg.
Diffstat (limited to 'Doc/tut')
-rw-r--r-- | Doc/tut/tut.tex | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex index f647aed..71d2973 100644 --- a/Doc/tut/tut.tex +++ b/Doc/tut/tut.tex @@ -1926,6 +1926,15 @@ 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} file; the only thing that's faster about \file{.pyc} or \file{.pyo} |