Hello,

from copy import deepcopy
z = deepcopy( Storage( a=5, c=10) )


Traceback (most recent call last):
  File "storage_deepcopy.py", line 136, in <module>
    z = deepcopy( x )
  File "/usr/lib/python2.5/copy.py", line 181, in deepcopy
    rv = reductor(2)
TypeError: 'NoneType' object is not callable


I could workaround in simple cases
z = Storage ( deepcopy( dict( Storage( a=5, c=10) ) ) )

but if I have complex structure and don't want to go into it
manually,
I should somehow implement __reduce_ex__ to behave well,
as the error context is:
                    reductor = getattr(x, "__reduce_ex__", None)
                    if reductor:
                        rv = reductor(2)

Reply via email to