Python 2.5.2 (r252:60911, May 7 2008, 15:19:09)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
.... member = None>>class Foo(Exception):
.... def __init__(self,member):
.... self.member=member
....
Traceback (most recent call last):>>import cPickle
str = cPickle.dumps(Foo('testmember'))
f2 = cPickle.loads(str)
File "<stdin>", line 1, in <module>
TypeError: ('__init__() takes exactly 2 arguments (1 given)', <class
'__main__.Foo'>, ())
In 2.4 I don't get an error. Is there something I am doing wrong?
Thanks.