mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Document -OO; "unsafe" optimization that removes docstrings.
Marc-Andre Lemburg.
This commit is contained in:
parent
bf07b29c04
commit
6b86a42c7f
2 changed files with 11 additions and 1 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue