From: Colin Watson Date: Thu, 7 Sep 2023 13:14:27 +0000 (+0100) Subject: GH-90915: Document that SystemExit doesn't trigger sys.excepthook (#31357) X-Git-Tag: v3.13.0a1~562 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1294fcede09af6c781553b7a3a6ff612c7dfa431;p=thirdparty%2FPython%2Fcpython.git GH-90915: Document that SystemExit doesn't trigger sys.excepthook (#31357) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Hugo van Kemenade --- diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index ba8d80bccbd8..c116f4b9b008 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -378,7 +378,7 @@ always available. This function prints out a given traceback and exception to ``sys.stderr``. - When an exception is raised and uncaught, the interpreter calls + When an exception other than :exc:`SystemExit` is raised and uncaught, the interpreter calls ``sys.excepthook`` with three arguments, the exception class, exception instance, and a traceback object. In an interactive session this happens just before control is returned to the prompt; in a Python program this happens just