diff options
author | Terry Reedy <tjreedy@udel.edu> | 2011-01-24 21:36:03 (GMT) |
---|---|---|
committer | Terry Reedy <tjreedy@udel.edu> | 2011-01-24 21:36:03 (GMT) |
commit | feac624827a6523e29f69210d69a0627d19bfd2b (patch) | |
tree | 3f5a72d4c04feaaa835e9d3edc63d0a7685d1ffa /Lib/ast.py | |
parent | b02701101b94bda88179652b0133557baa801368 (diff) | |
download | cpython-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.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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): |