[Tutor] Pickling objects and then carrying on development (original) (raw)

Adam adam at monkeez.org
Fri Jul 2 13:44:41 EDT 2004


OK - I have a kind of strange question. I'm developing an application which acts as a catalogue for magazine articles, storing each piece of information in an OO manner. I've written those objects to disk through pickle, which is an enormously cool feature of python.

My question relates to the pickled object and also the code that relates to those objects. If I enter data in and pickle this data, and then later develop my code adding more methods and functionality to each class, will the old data automatically gain all this new functionality when it is unpickled later?

The sequence would be:

  1. Data entry and pickle...
  2. Develop and improve code
  3. Load data
  4. continue with data entry
  5. pickle once more

Does the new pickle pick up all the new code that I've been working on, or will it b0rk the whole thing?

Any advice greatly received.

adam



More information about the Tutor mailing list