Ian Bicking: the old part of his blog


"Never keep anything you care about in a pickle". Well, one way around this is to decouple the storage from the representation. When you want to store something, zap up a more-or-less generic object from a MyStorage module and save the data on its attributes, then pickle *that*. To reinstantiate, make your actual data model objects consume an unpickled MyStorage object. Sure, it's an extra level of indirection, but it isolates you. I see that as somewhat more fun than messing around doing the sort of string-handling that one needs to with text files... and as soon as you have text files you *know* someone's going to start editing them, so you have to have a resilient parser... yada yada yada. :)
Comment on Persistent Persistence
by Ben Last