> I think that this is a bug, but removing those methods is not the right
> solution. The __reduce__ method is needed because builtin exceptions
> don't store their attributes in the __dict__ anymore; if you remove it,
> then those attributes will be lost during pickling. The __setstate__
> metho
Eric Huss wrote:
> Some subclasses of Exception are no longer pickleable in Python 2.5. An
> example:
>
[snip]
>
> Does anyone have any thoughts about this? Is it a bug?
>
> I can imagine one could argue that exceptions should call the base
> __init__ method to properly set args, but there are
Some subclasses of Exception are no longer pickleable in Python 2.5. An
example:
class A(Exception):
def __init__(self, foo):
self.foo = foo
The key problem here is if you do not somehow set self.args to the correct
arguments (via Exception.__init__ or setting self.args d