-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
GH-90915: Document that SystemExit doesn't trigger sys.excepthook #31357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This was documented in `help(sys)`, but not in the main library documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor change but worthy.
Doc/library/sys.rst
Outdated
before the program exits. The handling of such top-level exceptions can be | ||
customized by assigning another three-argument function to ``sys.excepthook``. | ||
When an exception other than :exc:`SystemExit` is raised and uncaught, | ||
the interpreter calls ``sys.excepthook`` with three arguments, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the lines after the addition of SystemExit
don't change, I'd say just make a new line even though it might be shorter than the rest so checking diff is easier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I've pushed to un-reflow this. (Also updated the branch from main
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This comment was marked as outdated.
This comment was marked as outdated.
…ok (pythonGH-31357) (cherry picked from commit 1294fce) Co-authored-by: Colin Watson <[email protected]> Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
GH-109082 is a backport of this pull request to the 3.12 branch. |
…ok (pythonGH-31357) (cherry picked from commit 1294fce) Co-authored-by: Colin Watson <[email protected]> Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
GH-109083 is a backport of this pull request to the 3.11 branch. |
…ook (GH-31357) (#109083) Co-authored-by: Colin Watson <[email protected]> Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
…ook (GH-31357) (#109082) GH-90915: Document that SystemExit doesn't trigger sys.excepthook (GH-31357) (cherry picked from commit 1294fce) Co-authored-by: Colin Watson <[email protected]> Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
This was documented in
help(sys)
, but not in the main librarydocumentation.
https://bugs.python.org/issue46759