gh-137988: Fix const description in argparse.add_argument() docs (#138315)

Co-authored-by: Savannah Bailey <savannahostrowski@gmail.com>
This commit is contained in:
PrinceNaroliya 2025-09-17 20:45:57 +05:30 committed by GitHub
parent a64881363b
commit 37425fe9fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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