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

Skip to content

Commit 916d8f8

Browse files
committed
No more threats, just list the new methods under "AST Objects".
1 parent 503d8d6 commit 916d8f8

2 files changed

Lines changed: 48 additions & 4 deletions

File tree

Doc/lib/libparser.tex

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ \subsection{AST Objects}
271271

272272
AST 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

277275
Ordered and equality comparisons are supported between AST objects.
278276
Pickling 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

Doc/libparser.tex

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ \subsection{AST Objects}
271271

272272
AST 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

277275
Ordered and equality comparisons are supported between AST objects.
278276
Pickling 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

0 commit comments

Comments
 (0)