mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-17232: Clarify docs for -O and -OO command line options (#5839)
The 'optimization' is for space in the executable file, not for run time.
This commit is contained in:
parent
6cdb7954b0
commit
186b606d8a
4 changed files with 23 additions and 6 deletions
|
|
@ -260,12 +260,23 @@ Miscellaneous options
|
|||
|
||||
.. cmdoption:: -O
|
||||
|
||||
Turn on basic optimizations. See also :envvar:`PYTHONOPTIMIZE`.
|
||||
Remove assert statements and any code conditional on the value of
|
||||
:const:`__debug__`. Augment the filename for compiled
|
||||
(:term:`bytecode`) files by adding ``.opt-1`` before the ``.pyc``
|
||||
extension (see :pep:`488`). See also :envvar:`PYTHONOPTIMIZE`.
|
||||
|
||||
.. versionchanged:: 3.5
|
||||
Modify ``.pyc`` filenames according to :pep:`488`.
|
||||
|
||||
|
||||
.. cmdoption:: -OO
|
||||
|
||||
Discard docstrings in addition to the :option:`-O` optimizations.
|
||||
Do :option:`-O` and also discard docstrings. Augment the filename
|
||||
for compiled (:term:`bytecode`) files by adding ``.opt-2`` before the
|
||||
``.pyc`` extension (see :pep:`488`).
|
||||
|
||||
.. versionchanged:: 3.5
|
||||
Modify ``.pyc`` filenames according to :pep:`488`.
|
||||
|
||||
|
||||
.. cmdoption:: -q
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue