https://github.com/python/cpython/commit/3d16dc6812b9b1d5d786fd72053202bb4b3f5b31 commit: 3d16dc6812b9b1d5d786fd72053202bb4b3f5b31 branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: hugovk <[email protected]> date: 2026-09-07T15:35:59+03:00 summary:
[3.15] gh-127296: Document that argparse count action starts from a non-zero default (GH-156908) (#156997) 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 9068190617ff872..8f61a7d070c3107 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -835,7 +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*. + 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]
