#1005803 python3: documentation of sys.excepthook is inconsistent about SystemExit

Package:
python3
Source:
python3-defaults
Description:
interactive high-level object-oriented language (default python3 version)
Submitter:
Matthew Vernon
Date:
2022-02-15 12:15:04 UTC
Severity:
normal
Tags:
#1005803#5
Date:
2022-02-15 10:31:29 UTC
From:
To:
Hi,

sys.excepthook is called to handle any uncaught exception, other than SystemExit.

This behaviour is described correctly in help(sys).

help(sys.excepthook) and the web documentation[0] both lack the IMO
important fact that python doesn't call excepthook for SystemExit. It
would be nice if they did :)

Thanks,

Matthew

[0] https://docs.python.org/3.11/library/sys.html#sys.excepthook

#1005803#10
Date:
2022-02-15 12:11:29 UTC
From:
To:
Control: forwarded -1 https://bugs.python.org/issue46759

I've forwarded this upstream as https://bugs.python.org/issue46759.