From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:54:23 +0000 (+0200) Subject: [3.13] gh-137988: Fix const description in argparse.add_argument() docs (GH-138315... X-Git-Tag: v3.13.8~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2806469667b3a38f265a22e67d7adcde2dc4f846;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-137988: Fix const description in argparse.add_argument() docs (GH-138315) (#139052) Co-authored-by: PrinceNaroliya Co-authored-by: Savannah Bailey --- diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 6d9348c54722..c470cd1adef8 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -896,8 +896,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