Skip to content

Commit 255fde8

Browse files
committed
documentation: move from "Compiler flags" to "ast helpers". 3.14 needs update, too.
1 parent 9e1f164 commit 255fde8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Doc/library/ast.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,6 +2528,20 @@ and classes for traversing abstract syntax trees:
25282528
Omit optional ``Load()`` values by default.
25292529

25302530

2531+
.. function:: compare(a, b, /, *, compare_attributes=False)
2532+
2533+
Recursively compares two ASTs.
2534+
2535+
*compare_attributes* affects whether AST attributes are considered
2536+
in the comparison. If *compare_attributes* is ``False`` (default), then
2537+
attributes are ignored. Otherwise they must all be equal. This
2538+
option is useful to check whether the ASTs are structurally equal but
2539+
differ in whitespace or similar details. Attributes include line numbers
2540+
and column offsets.
2541+
2542+
.. versionadded:: 3.14
2543+
2544+
25312545
.. _ast-compiler-flags:
25322546

25332547
Compiler flags
@@ -2563,20 +2577,6 @@ effects on the compilation of a program:
25632577
.. versionadded:: 3.8
25642578

25652579

2566-
.. function:: compare(a, b, /, *, compare_attributes=False)
2567-
2568-
Recursively compares two ASTs.
2569-
2570-
*compare_attributes* affects whether AST attributes are considered
2571-
in the comparison. If *compare_attributes* is ``False`` (default), then
2572-
attributes are ignored. Otherwise they must all be equal. This
2573-
option is useful to check whether the ASTs are structurally equal but
2574-
differ in whitespace or similar details. Attributes include line numbers
2575-
and column offsets.
2576-
2577-
.. versionadded:: 3.14
2578-
2579-
25802580
.. _ast-cli:
25812581

25822582
Command-line usage

0 commit comments

Comments
 (0)