mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-137988: Fix const description in argparse.add_argument() docs (#138315)
Co-authored-by: Savannah Bailey <savannahostrowski@gmail.com>
This commit is contained in:
parent
a64881363b
commit
37425fe9fb
1 changed files with 2 additions and 2 deletions
|
|
@ -981,8 +981,8 @@ the various :class:`ArgumentParser` actions. The two most common uses of it are
|
|||
(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional
|
||||
argument that can be followed by zero or one command-line arguments.
|
||||
When parsing the command line, if the option string is encountered with no
|
||||
command-line argument following it, the value of ``const`` will be assumed to
|
||||
be ``None`` instead. See the nargs_ description for examples.
|
||||
command-line argument following it, the value from ``const`` will be used.
|
||||
See the nargs_ description for examples.
|
||||
|
||||
.. versionchanged:: 3.11
|
||||
``const=None`` by default, including when ``action='append_const'`` or
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue