STINNER Victor <vstin...@redhat.com> added the comment:

> In any case, I think the namedtuple / structseq solution is elegant, because 
> we can add additional information later

I used the same design for the new sys.unraisablehook in bpo-36829 and I'm 
already working on adding a new 'err_msg' field to the argument passed to this 
took: PR 13488 :-)

I was trapped in the past when I had to modify warnings "hooks" 
(warnings.showwarning and warnings.formatwarning) when I had to add a new 
'source' parameter. I had to write wrappers which are fragile, to keep the 
backward compatibility.

> (the user must only be careful not to use tuple unpacking)

threading.excepthook doesn't mention the compatibility with tuple on purpose. 
It only documents attributes with their names.

----------

_______________________________________
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

Reply via email to