From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 30 May 2025 16:30:13 +0000 (+0200) Subject: [3.14] gh-134733: Fix documentation for the show_empty option of ast.dump() (GH-13492... X-Git-Tag: v3.14.0b3~128 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41fe324d8be433b2747d1247a1549fe5c2f2979b;p=thirdparty%2FPython%2Fcpython.git [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 1a89991d2362867a9127e151376135615bc92a4c) Co-authored-by: Serhiy Storchaka --- diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index cf22250cac60..ca0654acb336 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -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.