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

Skip to content

Commit 41fe324

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

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
@@ -2445,8 +2445,9 @@ and classes for traversing abstract syntax trees:
24452445
indents that many spaces per level. If *indent* is a string (such as ``"\t"``),
24462446
that string is used to indent each level.
24472447

2448-
If *show_empty* is ``False`` (the default), empty lists and fields that are ``None``
2449-
will be omitted from the output.
2448+
If *show_empty* is false (the default), optional empty lists will be
2449+
omitted from the output.
2450+
Optional ``None`` values are always omitted.
24502451

24512452
.. versionchanged:: 3.9
24522453
Added the *indent* option.

0 commit comments

Comments
 (0)
0