diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 0367c83d9369d3..220b153dd70e44 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -722,7 +722,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``::