Skip to content

Commit 1a89991

Browse files
gh-134733: Fix documentation for the show_empty option of ast.dump() (GH-134925)
Optional None values are always omitted.
1 parent 52deabe commit 1a89991

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)