Skip to content

Commit 3d16dc6

Browse files
miss-islingtonowenthcareysavannahostrowski
authored
[3.15] gh-127296: Document that argparse count action starts from a non-zero default (GH-156908) (#156997)
Co-authored-by: Owen Carey <37121709+owenthcarey@users.noreply.github.com> Co-authored-by: Savannah Ostrowski <savannah@python.org>
1 parent 5b9e06e commit 3d16dc6

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
@@ -835,7 +835,9 @@ how the command-line arguments should be handled. The supplied actions are:
835835
>>> parser.parse_args(['-vvv'])
836836
Namespace(verbose=3)
837837

838-
Note, the *default* will be ``None`` unless explicitly set to *0*.
838+
Unless explicitly set, the *default* will be ``None``. If the default
839+
value is a non-zero number, the count starts from that number rather
840+
than from zero.
839841

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

0 commit comments

Comments
 (0)