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
GH-90915: Document that SystemExit doesn't trigger sys.excepthook #31357
base: main
Are you sure you want to change the base?
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.
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
This was documented in
help(sys)
, but not in the main librarydocumentation.
https://bugs.python.org/issue46759