https://github.com/python/cpython/commit/384ac4ddb00c2ce3c79d6ac579150504a4c17d34
commit: 384ac4ddb00c2ce3c79d6ac579150504a4c17d34
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: savannahostrowski <[email protected]>
date: 2026-09-05T10:08:57-07:00
summary:

[3.14] gh-127296: Document that argparse count action starts from a non-zero 
default (GH-156908) (#156998)

gh-127296: Document that argparse count action starts from a non-zero default 
(GH-156908)
(cherry picked from commit 7a918411a300ddeef06d7f984bd23de8f6438421)

Co-authored-by: Owen Carey <[email protected]>
Co-authored-by: Savannah Ostrowski <[email protected]>

files:
M Doc/library/argparse.rst

diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index 6e3d0fea9ec9b0..20b69f9d1b821a 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -831,7 +831,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*.
+  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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to