mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
merge 3.3 (#19910)
This commit is contained in:
commit
d45a46b60d
2 changed files with 4 additions and 4 deletions
|
@ -193,9 +193,9 @@ are always available. They are listed here in alphabetical order.
|
||||||
.. function:: compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1)
|
.. function:: compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1)
|
||||||
|
|
||||||
Compile the *source* into a code or AST object. Code objects can be executed
|
Compile the *source* into a code or AST object. Code objects can be executed
|
||||||
by :func:`exec` or :func:`eval`. *source* can either be a string or an AST
|
by :func:`exec` or :func:`eval`. *source* can either be a normal string, a
|
||||||
object. Refer to the :mod:`ast` module documentation for information on how
|
byte string, or an AST object. Refer to the :mod:`ast` module documentation
|
||||||
to work with AST objects.
|
for information on how to work with AST objects.
|
||||||
|
|
||||||
The *filename* argument should give the file from which the code was read;
|
The *filename* argument should give the file from which the code was read;
|
||||||
pass some recognizable value if it wasn't read from a file (``'<string>'`` is
|
pass some recognizable value if it wasn't read from a file (``'<string>'`` is
|
||||||
|
|
|
@ -695,7 +695,7 @@ finally:
|
||||||
PyDoc_STRVAR(compile_doc,
|
PyDoc_STRVAR(compile_doc,
|
||||||
"compile(source, filename, mode[, flags[, dont_inherit]]) -> code object\n\
|
"compile(source, filename, mode[, flags[, dont_inherit]]) -> code object\n\
|
||||||
\n\
|
\n\
|
||||||
Compile the source string (a Python module, statement or expression)\n\
|
Compile the source (a Python module, statement or expression)\n\
|
||||||
into a code object that can be executed by exec() or eval().\n\
|
into a code object that can be executed by exec() or eval().\n\
|
||||||
The filename will be used for run-time error messages.\n\
|
The filename will be used for run-time error messages.\n\
|
||||||
The mode must be 'exec' to compile a module, 'single' to compile a\n\
|
The mode must be 'exec' to compile a module, 'single' to compile a\n\
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue