Skip to content

Commit 384ac4d

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

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

834-
Note, the *default* will be ``None`` unless explicitly set to *0*.
834+
Unless explicitly set, the *default* will be ``None``. If the default
835+
value is a non-zero number, the count starts from that number rather
836+
than from zero.
835837

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

0 commit comments

Comments
 (0)