Skip to content

Commit b370956

Browse files
[3.12] GH-79714: Add mention of stderr for clarity to ArgumentParser.exit() (GH-123932) (GH-124356)
(cherry picked from commit 5f5c0b9)
1 parent dd2066f commit b370956

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/argparse.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,8 +2190,8 @@ Exiting methods
21902190
.. method:: ArgumentParser.exit(status=0, message=None)
21912191

21922192
This method terminates the program, exiting with the specified *status*
2193-
and, if given, it prints a *message* before that. The user can override
2194-
this method to handle these steps differently::
2193+
and, if given, it prints a *message* to :data:`sys.stderr` before that.
2194+
The user can override this method to handle these steps differently::
21952195

21962196
class ErrorCatchingArgumentParser(argparse.ArgumentParser):
21972197
def exit(self, status=0, message=None):
@@ -2201,8 +2201,8 @@ Exiting methods
22012201

22022202
.. method:: ArgumentParser.error(message)
22032203

2204-
This method prints a usage message including the *message* to the
2205-
standard error and terminates the program with a status code of 2.
2204+
This method prints a usage message, including the *message*, to
2205+
:data:`sys.stderr` and terminates the program with a status code of 2.
22062206

22072207

22082208
Intermixed parsing

0 commit comments

Comments
 (0)