summaryrefslogtreecommitdiffstats
path: root/Lib/ast.py
diff options
context:
space:
mode:
authorTerry Reedy <tjreedy@udel.edu>2011-01-24 21:36:03 (GMT)
committerTerry Reedy <tjreedy@udel.edu>2011-01-24 21:36:03 (GMT)
commitfeac624827a6523e29f69210d69a0627d19bfd2b (patch)
tree3f5a72d4c04feaaa835e9d3edc63d0a7685d1ffa /Lib/ast.py
parentb02701101b94bda88179652b0133557baa801368 (diff)
downloadcpython-feac624827a6523e29f69210d69a0627d19bfd2b.zip
cpython-feac624827a6523e29f69210d69a0627d19bfd2b.tar.gz
cpython-feac624827a6523e29f69210d69a0627d19bfd2b.tar.bz2
Issue #11000 ast.parse parses source, not just expressions.
Diffstat (limited to 'Lib/ast.py')
-rw-r--r--Lib/ast.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/ast.py b/Lib/ast.py
index ba880c9..72237ed 100644
--- a/Lib/ast.py
+++ b/Lib/ast.py
@@ -28,12 +28,12 @@ from _ast import *
from _ast import __version__
-def parse(expr, filename='<unknown>', mode='exec'):
+def parse(source, filename='<unknown>', mode='exec'):
"""
- Parse an expression into an AST node.
- Equivalent to compile(expr, filename, mode, PyCF_ONLY_AST).
+ Parse the source into an AST node.
+ Equivalent to compile(source, filename, mode, PyCF_ONLY_AST).
"""
- return compile(expr, filename, mode, PyCF_ONLY_AST)
+ return compile(source, filename, mode, PyCF_ONLY_AST)
def literal_eval(node_or_string):