summaryrefslogtreecommitdiff
path: root/Doc/library/py_compile.rst
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2015-04-13 14:21:02 -0400
committerBrett Cannon <brett@python.org>2015-04-13 14:21:02 -0400
commitb09b34b211300f68cc98f6b882f7d2e2f4a76f10 (patch)
tree3663b436f2295e162cbd2a36f9cad1a6d28ad04b /Doc/library/py_compile.rst
parenta6a9e6d9d2f1f73e3411fce9468b8dcf8478b707 (diff)
downloadcpython-b09b34b211300f68cc98f6b882f7d2e2f4a76f10.tar.gz
Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
Diffstat (limited to 'Doc/library/py_compile.rst')
-rw-r--r--Doc/library/py_compile.rst9
1 files changed, 4 insertions, 5 deletions
diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst
index bae8450b7c..3647571090 100644
--- a/Doc/library/py_compile.rst
+++ b/Doc/library/py_compile.rst
@@ -29,9 +29,9 @@ byte-code cache files in the directory containing the source code.
.. function:: compile(file, cfile=None, dfile=None, doraise=False, optimize=-1)
Compile a source file to byte-code and write out the byte-code cache file.
- The source code is loaded from the file name *file*. The byte-code is
- written to *cfile*, which defaults to the :PEP:`3147` path, ending in
- ``.pyc`` (``.pyo`` if optimization is enabled in the current interpreter).
+ The source code is loaded from the file name *file*. The byte-code is
+ written to *cfile*, which defaults to the :pep:`3147`/:pep`488` path, ending
+ in ``.pyc``.
For example, if *file* is ``/foo/bar/baz.py`` *cfile* will default to
``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2. If *dfile* is
specified, it is used as the name of the source file in error messages when
@@ -68,7 +68,7 @@ byte-code cache files in the directory containing the source code.
.. function:: main(args=None)
Compile several source files. The files named in *args* (or on the command
- line, if *args* is ``None``) are compiled and the resulting bytecode is
+ line, if *args* is ``None``) are compiled and the resulting byte-code is
cached in the normal manner. This function does not search a directory
structure to locate source files; it only compiles files named explicitly.
If ``'-'`` is the only parameter in args, the list of files is taken from
@@ -86,4 +86,3 @@ could not be compiled.
Module :mod:`compileall`
Utilities to compile all Python source files in a directory tree.
-