[Python-Dev] bpo-36829: Add sys.unraisablehook()
barry at python.org
Thu May 16 14:10:55 EDT 2019
On May 16, 2019, at 03:12, Victor Stinner <vstinner at redhat.com> wrote:
> I came to the UnraisableHookArgs structseq idea because of my bad
> experience with extension warnings "hooks". Let me tell you this story
Thanks for that!
> def showwarning(message, category, filename, lineno, file=None, line=None): ...
> def formatwarning(message, category, filename, lineno, line=None): …
While I’m fine with the API you propose, you could consider keyword-only arguments to help future proof the call signature. I don’t like it as much because it’s not as backward compatibility proof, but it’s an option to perhaps consider.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: Message signed with OpenPGP
More information about the Python-Dev