Skip to content

Commit 6d53b75

Browse files
gh-133046: Reformat the ast module docstring (GH-133050)
* Fix formatting in module docstring for `ast` #133046 * #133046 ast docstring: remove header, dedent, 80-char width. * Keep existing wrapping --------- Co-authored-by: Adam Turner <[email protected]>
1 parent 28a2fd0 commit 6d53b75

File tree

1 file changed

+20
-24
lines changed

1 file changed

+20
-24
lines changed

Lib/ast.py

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
"""
2-
ast
3-
~~~
4-
5-
The `ast` module helps Python applications to process trees of the Python
6-
abstract syntax grammar. The abstract syntax itself might change with
7-
each Python release; this module helps to find out programmatically what
8-
the current grammar looks like and allows modifications of it.
9-
10-
An abstract syntax tree can be generated by passing `ast.PyCF_ONLY_AST` as
11-
a flag to the `compile()` builtin function or by using the `parse()`
12-
function from this module. The result will be a tree of objects whose
13-
classes all inherit from `ast.AST`.
14-
15-
A modified abstract syntax tree can be compiled into a Python code object
16-
using the built-in `compile()` function.
17-
18-
Additionally various helper functions are provided that make working with
19-
the trees simpler. The main intention of the helper functions and this
20-
module in general is to provide an easy to use interface for libraries
21-
that work tightly with the python syntax (template engines for example).
22-
23-
24-
:copyright: Copyright 2008 by Armin Ronacher.
25-
:license: Python License.
2+
The `ast` module helps Python applications to process trees of the Python
3+
abstract syntax grammar. The abstract syntax itself might change with
4+
each Python release; this module helps to find out programmatically what
5+
the current grammar looks like and allows modifications of it.
6+
7+
An abstract syntax tree can be generated by passing `ast.PyCF_ONLY_AST` as
8+
a flag to the `compile()` builtin function or by using the `parse()`
9+
function from this module. The result will be a tree of objects whose
10+
classes all inherit from `ast.AST`.
11+
12+
A modified abstract syntax tree can be compiled into a Python code object
13+
using the built-in `compile()` function.
14+
15+
Additionally various helper functions are provided that make working with
16+
the trees simpler. The main intention of the helper functions and this
17+
module in general is to provide an easy to use interface for libraries
18+
that work tightly with the python syntax (template engines for example).
19+
20+
:copyright: Copyright 2008 by Armin Ronacher.
21+
:license: Python License.
2622
"""
2723
from _ast import *
2824

0 commit comments

Comments
 (0)