8000 [3.13] gh-134733: Fix documentation for the show_empty option of ast.… · python/cpython@7c5a1ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 7c5a1ea

Browse files
[3.13] gh-134733: Fix documentation for the show_empty option of ast.dump() (GH-134925) (GH-134941)
Optional None values are always omitted. (cherry picked from commit 1a89991) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 681856c commit 7c5a1ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/ast.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2440,8 +2440,9 @@ and classes for traversing abstract syntax trees:
24402440
indents that many spaces per level. If *indent* is a string (such as ``"\t"``),
24412441
that string is used to indent each level.
24422442

2443-
If *show_empty* is ``False`` (the default), empty lists and fields that are ``None``
2444-
will be omitted from the output.
2443+
If *show_empty* is false (the default), optional empty lists will be
2444+
omitted from the output.
2445+
Optional ``None`` values are always omitted.
24452446

24462447
.. versionchanged:: 3.9
24472448
Added the *indent* option.

0 commit comments

Comments
 (0)
0