[Python-Dev] bpo-36829: Add sys.unraisablehook() (original) (raw)
Nathaniel Smith njs at pobox.com
Thu May 16 17:46:32 EDT 2019
- Previous message (by thread): [Python-Dev] bpo-36829: Add sys.unraisablehook()
- Next message (by thread): [Python-Dev] bpo-36829: Add sys.unraisablehook()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, May 16, 2019 at 2:17 PM Steve Dower <steve.dower at python.org> wrote:
You go on to say "pass an error message" and "keep repr(obj) if you want", but how is this different from creating an exception that contains the custom message, the repr of the object, and chains the exception that triggered it?
A clever hook might want the actual object, so it can pretty-print it, or open an interactive debugger and let it you examine it, or something. Morally this is similar to calling repr(obj), but it doesn't literally call repr(obj).
-n
-- Nathaniel J. Smith -- https://vorpus.org
- Previous message (by thread): [Python-Dev] bpo-36829: Add sys.unraisablehook()
- Next message (by thread): [Python-Dev] bpo-36829: Add sys.unraisablehook()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]