Neal Becker wrote: > What happens if I pickle a class, and later unpickle it where the class > now has added some new attributes?
- If the added attributes' values are immutable, provide defaults as class
attributes.
- Implement an appropriate __setstate__() method. The easiest would be
# untested
def __setstate__(self, state):
self.__dict__.update(newattr1=42, newattr2=[])
self.__dict__.update(state)
--
http://mail.python.org/mailman/listinfo/python-list
