Gelonida N wrote: > Is there anyhing like a built in signature which would help to detect, > that one tries to unpickle an object whose byte code has changed?
No. The only thing that is stored is the "protocol", the format used to store the data. > The idea is to distinguish old and new pickled data and start some > 'migration code' fi required > The only thing, that I thought about so far was adding an explicit > version number to each class in order to detect such situations. If you know in advance that your class will undergo significant changes you may also consider storing more stable data in a file format that can easily be modified, e. g. json. -- http://mail.python.org/mailman/listinfo/python-list