File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -271,8 +271,6 @@ \subsection{AST Objects}
271271
272272AST objects returned by \function {expr()}, \function {suite()} and
273273\function {sequence2ast()} have no methods of their own.
274- Some of the functions defined which accept an AST object as their
275- first argument may change to object methods in the future.
276274
277275Ordered and equality comparisons are supported between AST objects.
278276Pickling of AST objects (using the \module {pickle} module) is also
@@ -284,6 +282,30 @@ \subsection{AST Objects}
284282\end {datadesc }
285283
286284
285+ AST objects have the following methods:
286+
287+
288+ \begin {methoddesc }[AST]{compile}{\optional {filename}}
289+ Same as \code {compileast(\var {ast}, \var {filename})}.
290+ \end {methoddesc }
291+
292+ \begin {methoddesc }[AST]{isexpr}{}
293+ Same as \code {isexpr(\var {ast})}.
294+ \end {methoddesc }
295+
296+ \begin {methoddesc }[AST]{issuite}{}
297+ Same as \code {issuite(\var {ast})}.
298+ \end {methoddesc }
299+
300+ \begin {methoddesc }[AST]{tolist}{\optional {line_info}}
301+ Same as \code {ast2list(\var {ast}, \var {line_info})}.
302+ \end {methoddesc }
303+
304+ \begin {methoddesc }[AST]{totuple}{\optional {line_info}}
305+ Same as \code {ast2tuple(\var {ast}, \var {line_info})}.
306+ \end {methoddesc }
307+
308+
287309\subsection {Examples }
288310\nodename {AST Examples}
289311
Original file line number Diff line number Diff line change @@ -271,8 +271,6 @@ \subsection{AST Objects}
271271
272272AST objects returned by \function {expr()}, \function {suite()} and
273273\function {sequence2ast()} have no methods of their own.
274- Some of the functions defined which accept an AST object as their
275- first argument may change to object methods in the future.
276274
277275Ordered and equality comparisons are supported between AST objects.
278276Pickling of AST objects (using the \module {pickle} module) is also
@@ -284,6 +282,30 @@ \subsection{AST Objects}
284282\end {datadesc }
285283
286284
285+ AST objects have the following methods:
286+
287+
288+ \begin {methoddesc }[AST]{compile}{\optional {filename}}
289+ Same as \code {compileast(\var {ast}, \var {filename})}.
290+ \end {methoddesc }
291+
292+ \begin {methoddesc }[AST]{isexpr}{}
293+ Same as \code {isexpr(\var {ast})}.
294+ \end {methoddesc }
295+
296+ \begin {methoddesc }[AST]{issuite}{}
297+ Same as \code {issuite(\var {ast})}.
298+ \end {methoddesc }
299+
300+ \begin {methoddesc }[AST]{tolist}{\optional {line_info}}
301+ Same as \code {ast2list(\var {ast}, \var {line_info})}.
302+ \end {methoddesc }
303+
304+ \begin {methoddesc }[AST]{totuple}{\optional {line_info}}
305+ Same as \code {ast2tuple(\var {ast}, \var {line_info})}.
306+ \end {methoddesc }
307+
308+
287309\subsection {Examples }
288310\nodename {AST Examples}
289311
You can’t perform that action at this time.
0 commit comments