https://github.com/python/cpython/commit/2fa4e32df39c68598bfe2850c1ea21b74381d1de commit: 2fa4e32df39c68598bfe2850c1ea21b74381d1de branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: savannahostrowski <[email protected]> date: 2026-09-05T10:09:57-07:00 summary:
[3.13] gh-127296: Document that argparse count action starts from a non-zero default (GH-156908) (#156999) 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 d4c5f521251b6b..790d7564aafa64 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -734,7 +734,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]
