]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Note argparse exit code in documentation (GH-119568) (GH-125275)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 10 Oct 2024 18:18:01 +0000 (20:18 +0200)
committerGitHub <noreply@github.com>
Thu, 10 Oct 2024 18:18:01 +0000 (21:18 +0300)
(cherry picked from commit 3b87fb74c907510402678bf1b7c4a94df0e5e65a)

Co-authored-by: Justin Kunimune <justinkunimune@gmail.com>
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
Doc/library/argparse.rst

index abe20d7d611695f56f8b05670f7e2baaf07e5bdc..6d8b207cbc03ab3f57b7aad67f2d114c953dfe68 100644 (file)
@@ -537,7 +537,8 @@ exit_on_error
 ^^^^^^^^^^^^^
 
 Normally, when you pass an invalid argument list to the :meth:`~ArgumentParser.parse_args`
-method of an :class:`ArgumentParser`, it will exit with error info.
+method of an :class:`ArgumentParser`, it will print a *message* to :data:`sys.stderr` and exit with a status
+code of 2.
 
 If the user would like to catch errors manually, the feature can be enabled by setting
 ``exit_on_error`` to ``False``::