On 7-12-2009 10:12, Peter Otten wrote:
So there are 2 problems: the pickle protocol isn't used when exception
objects (or instances of classes derived from Exception) are pickled, and
during unpickling, it then
crashes because it calls __init__ with the wrong amount of parameters.
(why is it bo
Irmen de Jong wrote:
> I am puzzled why Python's exception classes don't seem to follow the
> pickle protocol. To be more specific: an instance of a user defined
> exception, subclassed from Exception, cannot be pickled/unpickled
> correctly in the expected way.
>
> The pickle protocol says that:
Hi,
I am puzzled why Python's exception classes don't seem to follow the pickle
protocol.
To be more specific: an instance of a user defined exception, subclassed from Exception,
cannot be pickled/unpickled correctly in the expected way.
The pickle protocol says that:
__getinitargs__ is used