STINNER Victor <vstin...@redhat.com> added the comment:
Serhiy Storchaka: > I propose to add the Thead.excepthook() method with the signature compatible > with sys.excepthook(). This will allow to set easily per-thread hooks and a > global hook. I don't see the relationship between the API (signature) and the ability to set a per-thread hook. I'm not convinced that a per-thread hook is needed. My proposed global threading.excepthook gets a thread parameter which allows a custom hook to implement a different behavior depending on the thread. You can use a different behavior depending on the thread name, depending on a custom Thread attribute, etc. Would it be acceptable for first add a global hook and see later if a per-thread hook is needed? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue1230540> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com