]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-134733: Fix documentation for the show_empty option of ast.dump() (GH-134925)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 30 May 2025 15:52:36 +0000 (18:52 +0300)
committerGitHub <noreply@github.com>
Fri, 30 May 2025 15:52:36 +0000 (15:52 +0000)
Optional None values are always omitted.

Doc/library/ast.rst

index cf22250cac60916cbd40ddf0eeb28b5f52c1ce92..ca0654acb3368926256d136f062f0eb0991afbba 100644 (file)
@@ -2445,8 +2445,9 @@ and classes for traversing abstract syntax trees:
    indents that many spaces per level.  If *indent* is a string (such as ``"\t"``),
    that string is used to indent each level.
 
-   If *show_empty* is ``False`` (the default), empty lists and fields that are ``None``
-   will be omitted from the output.
+   If *show_empty* is false (the default), optional empty lists will be
+   omitted from the output.
+   Optional ``None`` values are always omitted.
 
    .. versionchanged:: 3.9
       Added the *indent* option.