]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-137988: Fix const description in argparse.add_argument() docs (GH-138315...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 17 Sep 2025 15:51:30 +0000 (17:51 +0200)
committerGitHub <noreply@github.com>
Wed, 17 Sep 2025 15:51:30 +0000 (18:51 +0300)
Co-authored-by: PrinceNaroliya <naroliyaprince@gmail.com>
Co-authored-by: Savannah Bailey <savannahostrowski@gmail.com>
Doc/library/argparse.rst

index 79e15994491eff884082d1af5e57a50dafa7dd1a..ef8242f5f780f5308bba23ec64db3d71acc8abb0 100644 (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