Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e2248f9

Browse files
committed
Issue #11000 ast.parse doc fix (r88172) + tix fix (r88170)
1 parent 0f2a61a commit e2248f9

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

Doc/library/ast.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ The abstract grammar is currently defined as follows:
107107
Apart from the node classes, :mod:`ast` module defines these utility functions
108108
and classes for traversing abstract syntax trees:
109109

110-
.. function:: parse(expr, filename='<unknown>', mode='exec')
110+
.. function:: parse(source, filename='<unknown>', mode='exec')
111111

112-
Parse an expression into an AST node. Equivalent to ``compile(expr,
112+
Parse the source into an AST node. Equivalent to ``compile(source,
113113
filename, mode, ast.PyCF_ONLY_AST)``.
114114

115115

Doc/library/tkinter.tix.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,8 @@ Tix Commands
503503

504504
To view the current settings, the common usage is::
505505

506-
import Tix
507-
root = Tix.Tk()
506+
from tkinter import tix
507+
root = tix.Tk()
508508
print(root.tix_configure())
509509

510510

Lib/ast.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
from _ast import __version__
3030

3131

32-
def parse(expr, filename='<unknown>', mode='exec'):
32+
def parse(source, filename='<unknown>', mode='exec'):
3333
"""
34-
Parse an expression into an AST node.
35-
Equivalent to compile(expr, filename, mode, PyCF_ONLY_AST).
34+
Parse the source into an AST node.
35+
Equivalent to compile(source, filename, mode, PyCF_ONLY_AST).
3636
"""
37-
return compile(expr, filename, mode, PyCF_ONLY_AST)
37+
return compile(source, filename, mode, PyCF_ONLY_AST)
3838

3939

4040
def literal_eval(node_or_string):

0 commit comments

Comments
 (0)