From 8da8655a7bffaa3fe404e3def32fdaf1fd0b1e63 Mon Sep 17 00:00:00 2001 From: Owen Carey <37121709+owenthcarey@users.noreply.github.com> Date: Thu, 3 Sep 2026 12:42:26 -0700 Subject: [PATCH 1/2] gh-127296: Document that argparse count action starts from a non-zero default --- Doc/library/argparse.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index b2318ddace8514b..a988d889ccdc6d4 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -836,6 +836,8 @@ how the command-line arguments should be handled. The supplied actions are: Namespace(verbose=3) Note, the *default* will be ``None`` unless explicitly set to *0*. + If the default value is a non-zero number, the count starts from that + number rather than from zero. * ``'help'`` - This prints a complete help message for all the options in the current parser and then exits. By default a help action is automatically From dcab2c274458732e14a1dedf79c91416af11f7ad Mon Sep 17 00:00:00 2001 From: Owen Carey <37121709+owenthcarey@users.noreply.github.com> Date: Fri, 4 Sep 2026 22:26:26 -0700 Subject: [PATCH 2/2] Update Doc/library/argparse.rst Co-authored-by: Savannah Ostrowski --- Doc/library/argparse.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index a988d889ccdc6d4..fc5302d875fc1f9 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -835,9 +835,9 @@ how the command-line arguments should be handled. The supplied actions are: >>> parser.parse_args(['-vvv']) Namespace(verbose=3) - Note, the *default* will be ``None`` unless explicitly set to *0*. - If the default value is a non-zero number, the count starts from that - number rather than from zero. + Unless explicitly set, the *default* will be ``None``. If the default + value is a non-zero number, the count starts from that number rather + than from zero. * ``'help'`` - This prints a complete help message for all the options in the current parser and then exits. By default a help action is automatically