[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

Antoine Pitrou report at bugs.python.org
Fri Jul 27 01:23:17 CEST 2012


Antoine Pitrou <pitrou at free.fr> added the comment:

> I think there are two options simple enough to sneak in to 3.3:
> 
> (1) The trivial patch of initially setting self->args in __new__().
> 
> (2) Georg's idea of additionally setting a __newargs__ attribute in
> __new__() and using it in __reduce__().  However, I would store
> __newargs__ directly in the struct to avoid always triggering creation
> of a dict for the instance.

At this point of the release process, the trivial approach sounds safer
to me (but is it?).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1692335>
_______________________________________


More information about the Python-bugs-list mailing list