Skip to content

Commit 2806469

Browse files
miss-islingtonPrinceNaroliyasavannahostrowski
authored
[3.13] gh-137988: Fix const description in argparse.add_argument() docs (GH-138315) (#139052)
Co-authored-by: PrinceNaroliya <[email protected]> Co-authored-by: Savannah Bailey <[email protected]>
1 parent 13761d1 commit 2806469

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/argparse.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,8 +896,8 @@ the various :class:`ArgumentParser` actions. The two most common uses of it are
896896
(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional
897897
argument that can be followed by zero or one command-line arguments.
898898
When parsing the command line, if the option string is encountered with no
899-
command-line argument following it, the value of ``const`` will be assumed to
900-
be ``None`` instead. See the nargs_ description for examples.
899+
command-line argument following it, the value from ``const`` will be used.
900+
See the nargs_ description for examples.
901901

902902
.. versionchanged:: 3.11
903903
``const=None`` by default, including when ``action='append_const'`` or

0 commit comments

Comments
 (0)