mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #11000 ast.parse parses source, not just expressions.
This commit is contained in:
parent
b02701101b
commit
feac624827
2 changed files with 6 additions and 6 deletions
|
@ -110,9 +110,9 @@ The abstract grammar is currently defined as follows:
|
|||
Apart from the node classes, :mod:`ast` module defines these utility functions
|
||||
and classes for traversing abstract syntax trees:
|
||||
|
||||
.. function:: parse(expr, filename='<unknown>', mode='exec')
|
||||
.. function:: parse(source, filename='<unknown>', mode='exec')
|
||||
|
||||
Parse an expression into an AST node. Equivalent to ``compile(expr,
|
||||
Parse the source into an AST node. Equivalent to ``compile(source,
|
||||
filename, mode, ast.PyCF_ONLY_AST)``.
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue