"Knacktus" <[email protected]> wrote
###########################################################################
my_favourite_movies = FavouriteMovies([Movie("Gladiator", "Russel
Crowe")])
###########################################################################
When I want to rebuild the data from a xml file or database, my
objects somehow need to know which references to other objects they
hold.
OK, If you limit yourself to XML or a database then yes you will
need an ID and use the IDs as references. Thats why Pickle/Shelve
are so convenient for persistence - they don;t need the references,
you can just pickle the list of objects, or whatever.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor