From 85c153f08e83c0f3ad3c659f7dc818e867c5e72b Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 30 May 2025 18:52:36 +0300 Subject: [PATCH] gh-134733: Fix documentation for the show_empty option of ast.dump() (GH-134925) Optional None values are always omitted. (cherry picked from commit 1a89991d2362867a9127e151376135615bc92a4c) Co-authored-by: Serhiy Storchaka --- Doc/library/ast.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index eb5bcd00122d97..ec6a4a82d6fd7f 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -2440,8 +2440,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.