]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Note argparse exit code in documentation (GH-119568)
authorJustin Kunimune <justinkunimune@gmail.com>
Thu, 10 Oct 2024 17:56:05 +0000 (13:56 -0400)
committerGitHub <noreply@github.com>
Thu, 10 Oct 2024 17:56:05 +0000 (20:56 +0300)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
Doc/library/argparse.rst

index e9a08984f77c3aebd0441799e49f7fc534a734cb..4eb6fad41f11ef987171523cc6b4bb91b59ea0b7 100644 (file)
@@ -541,7 +541,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``::