Amaury Forgeot d'Arc added the comment:
This is expected, your class must say how this __new__ constructor can be
called.
http://docs.python.org/2/library/pickle.html#object.__getnewargs__
--
nosy: +amaury.forgeotdarc
resolution: -> works for me
status: open -> closed
New submission from yoch:
Hi,
If some class objects have extra arguments in the __new__ constructor , pickle
fail to serialize it.
Here the output of provided test-case :
Traceback (most recent call last):
File "/home/yoch/bug.py", line 19, in
y = pickle.load(fp)
TypeError: __new__() m