8000 [3.13] Note argparse exit code in documentation (GH-119568) (GH-125274) · python/cpython@319305c · GitHub
[go: up one dir, main page]

Skip to content

Commit 319305c

Browse files
miss-islingtonjkunimunesavannahostrowski
authored
[3.13] Note argparse exit code in documentation (GH-119568) (GH-125274)
(cherry picked from commit 3b87fb7) Co-authored-by: Justin Kunimune <justinkunimune@gmail.com> Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
1 parent 2f87976 commit 319305c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/argparse.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,8 @@ exit_on_error
537537
^^^^^^^^^^^^^
538538

539539
Normally, when you pass an invalid argument list to the :meth:`~ArgumentParser.parse_args`
540-
method of an :class:`ArgumentParser`, it will exit with error info.
540+
method of an :class:`ArgumentParser`, it will print a *message* to :data:`sys.stderr` and exit with a status
541+
code of 2.
541542

542543
If the user would like to catch errors manually, the feature can be enabled by setting
543544
``exit_on_error`` to ``False``::

0 commit comments

Comments
 (0)
0