From e2248f9e6d9b048e61d5117a6621e46e7df1866d Mon Sep 17 00:00:00 2001 From: Terry Reedy Date: Mon, 24 Jan 2011 21:46:05 +0000 Subject: Issue #11000 ast.parse doc fix (r88172) + tix fix (r88170) --- Doc/library/ast.rst | 4 ++-- Doc/library/tkinter.tix.rst | 4 ++-- Lib/ast.py | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index ae57e80..08ee714 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -107,9 +107,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='', mode='exec') +.. function:: parse(source, filename='', 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)``. diff --git a/Doc/library/tkinter.tix.rst b/Doc/library/tkinter.tix.rst index 68d8f5a..beb91e6 100644 --- a/Doc/library/tkinter.tix.rst +++ b/Doc/library/tkinter.tix.rst @@ -503,8 +503,8 @@ Tix Commands To view the current settings, the common usage is:: - import Tix - root = Tix.Tk() + from tkinter import tix + root = tix.Tk() print(root.tix_configure()) diff --git a/Lib/ast.py b/Lib/ast.py index f8c4d3c..112c970 100644 --- a/Lib/ast.py +++ b/Lib/ast.py @@ -29,12 +29,12 @@ from _ast import * from _ast import __version__ -def parse(expr, filename='', mode='exec'): +def parse(source, filename='', 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): -- cgit v0.12