Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8)

Side by Side Diff: Doc/library/ast.rst

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/install/install.rst ('k') | Doc/library/cmd.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`ast` --- Abstract Syntax Trees 1 :mod:`ast` --- Abstract Syntax Trees
2 ==================================== 2 ====================================
3 3
4 .. module:: ast 4 .. module:: ast
5 :synopsis: Abstract Syntax Tree classes and manipulation. 5 :synopsis: Abstract Syntax Tree classes and manipulation.
6 6
7 .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de> 7 .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
8 .. sectionauthor:: Georg Brandl <georg@python.org> 8 .. sectionauthor:: Georg Brandl <georg@python.org>
9 9
10 **Source code:** :source:`Lib/ast.py` 10 **Source code:** :source:`Lib/ast.py`
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 or the more compact :: 88 or the more compact ::
89 89
90 node = ast.UnaryOp(ast.USub(), ast.Num(5, lineno=0, col_offset=0), 90 node = ast.UnaryOp(ast.USub(), ast.Num(5, lineno=0, col_offset=0),
91 lineno=0, col_offset=0) 91 lineno=0, col_offset=0)
92 92
93 93
94 .. _abstract-grammar: 94 .. _abstract-grammar:
95 95
96 Abstract Grammar 96 Abstract Grammar
97 ---------------- 97 ----------------
98
99 The module defines a string constant ``__version__`` which is the Mercurial
100 revision of the file shown below.
98 101
99 The abstract grammar is currently defined as follows: 102 The abstract grammar is currently defined as follows:
100 103
101 .. literalinclude:: ../../Parser/Python.asdl 104 .. literalinclude:: ../../Parser/Python.asdl
102 105
103 106
104 :mod:`ast` Helpers 107 :mod:`ast` Helpers
105 ------------------ 108 ------------------
106 109
107 Apart from the node classes, :mod:`ast` module defines these utility functions 110 Apart from the node classes, :mod:`ast` module defines these utility functions
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 243
241 244
242 .. function:: dump(node, annotate_fields=True, include_attributes=False) 245 .. function:: dump(node, annotate_fields=True, include_attributes=False)
243 246
244 Return a formatted dump of the tree in *node*. This is mainly useful for 247 Return a formatted dump of the tree in *node*. This is mainly useful for
245 debugging purposes. The returned string will show the names and the values 248 debugging purposes. The returned string will show the names and the values
246 for fields. This makes the code impossible to evaluate, so if evaluation is 249 for fields. This makes the code impossible to evaluate, so if evaluation is
247 wanted *annotate_fields* must be set to False. Attributes such as line 250 wanted *annotate_fields* must be set to False. Attributes such as line
248 numbers and column offsets are not dumped by default. If this is wanted, 251 numbers and column offsets are not dumped by default. If this is wanted,
249 *include_attributes* can be set to ``True``. 252 *include_attributes* can be set to ``True``.
OLDNEW
« no previous file with comments | « Doc/install/install.rst ('k') | Doc/library/cmd.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+