]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] GH-79714: Add mention of stderr for clarity to ArgumentParser.exit() (GH-12393...
authorSavannah Ostrowski <savannahostrowski@gmail.com>
Mon, 23 Sep 2024 19:04:36 +0000 (12:04 -0700)
committerGitHub <noreply@github.com>
Mon, 23 Sep 2024 19:04:36 +0000 (19:04 +0000)
(cherry picked from commit 5f5c0b9c23238dc0a1fdb764f625ae0cc5604519)

Doc/library/argparse.rst

index b7ed3f5e7cb5f26783dc9506da4aed9be44db6b1..82f11e1b9aad6dcf6770f6f1b304f9966820f122 100644 (file)
@@ -2190,8 +2190,8 @@ Exiting methods
 .. method:: ArgumentParser.exit(status=0, message=None)
 
    This method terminates the program, exiting with the specified *status*
-   and, if given, it prints a *message* before that. The user can override
-   this method to handle these steps differently::
+   and, if given, it prints a *message* to :data:`sys.stderr` before that.
+   The user can override this method to handle these steps differently::
 
     class ErrorCatchingArgumentParser(argparse.ArgumentParser):
         def exit(self, status=0, message=None):
@@ -2201,8 +2201,8 @@ Exiting methods
 
 .. method:: ArgumentParser.error(message)
 
-   This method prints a usage message including the *message* to the
-   standard error and terminates the program with a status code of 2.
+   This method prints a usage message, including the *message*, to
+   :data:`sys.stderr` and terminates the program with a status code of 2.
 
 
 Intermixed parsing