]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-148063: documentation: move ast.compare from "Compiler flags" to "ast helpe...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 3 May 2026 16:02:25 +0000 (18:02 +0200)
committerGitHub <noreply@github.com>
Sun, 3 May 2026 16:02:25 +0000 (16:02 +0000)
(cherry picked from commit 7b0244dbc7a5ba037e2cf2b5c8db1e35a0643a18)

Co-authored-by: Hunter Hogan <hunterhogan@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
Doc/library/ast.rst

index 31c406c62b171fc1f308fa92e143db5da69ee215..583b55cc8c14b8ed3b67d9926e61d35ee34c7c68 100644 (file)
@@ -2549,6 +2549,20 @@ and classes for traversing abstract syntax trees:
              type_ignores=[])
 
 
+.. function:: compare(a, b, /, *, compare_attributes=False)
+
+   Recursively compares two ASTs.
+
+   *compare_attributes* affects whether AST attributes are considered
+   in the comparison. If *compare_attributes* is ``False`` (default), then
+   attributes are ignored. Otherwise they must all be equal. This
+   option is useful to check whether the ASTs are structurally equal but
+   differ in whitespace or similar details. Attributes include line numbers
+   and column offsets.
+
+   .. versionadded:: 3.14
+
+
 .. _ast-compiler-flags:
 
 Compiler flags
@@ -2584,20 +2598,6 @@ effects on the compilation of a program:
    .. versionadded:: 3.8
 
 
-.. function:: compare(a, b, /, *, compare_attributes=False)
-
-   Recursively compares two ASTs.
-
-   *compare_attributes* affects whether AST attributes are considered
-   in the comparison. If *compare_attributes* is ``False`` (default), then
-   attributes are ignored. Otherwise they must all be equal. This
-   option is useful to check whether the ASTs are structurally equal but
-   differ in whitespace or similar details. Attributes include line numbers
-   and column offsets.
-
-   .. versionadded:: 3.14
-
-
 .. _ast-cli:
 
 Command-line usage