Skip to content

Commit 2fa4e32

Browse files
miss-islingtonowenthcareysavannahostrowski
authored
[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 7a91841) Co-authored-by: Owen Carey <37121709+owenthcarey@users.noreply.github.com> Co-authored-by: Savannah Ostrowski <savannah@python.org>
1 parent 0da9c27 commit 2fa4e32

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Doc/library/argparse.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,9 @@ how the command-line arguments should be handled. The supplied actions are:
734734
>>> parser.parse_args(['-vvv'])
735735
Namespace(verbose=3)
736736

737-
Note, the *default* will be ``None`` unless explicitly set to *0*.
737+
Unless explicitly set, the *default* will be ``None``. If the default
738+
value is a non-zero number, the count starts from that number rather
739+
than from zero.
738740

739741
* ``'help'`` - This prints a complete help message for all the options in the
740742
current parser and then exits. By default a help action is automatically

0 commit comments

Comments
 (0)