[Tutor] Re: Pickle / Shelve

Charlie Clark charlie@begeistert.org
Thu Apr 3 12:17:02 2003

On 2003-04-03 at 19:00:06 [+0200], bgailer@alum.rpi.edu wrote:
> I'm running into problems shelving objects that contain references to 
> other objects that contain unPickleable items.
> Is there a way around this other than writing __getstate__ methods for 
> each object? Is there a switch that says "ignore item if unPickleable", 
> or a way to subclass shelve or pickle to accomplish this?

Hi Bill,

maybe I can pay you back quicker than I thought but probably not ;-). It 
seems as if you've already checked out the Cookbook on this but the 
Cookbook refers to the "Python Standard Library" which covers using 
copy_reg and marshal to create custom picklers and unpicklers. Do you think 
this might be useful? Do you have access to this?