persistent deque

inhahe inhahe at gmail.com
Wed May 21 02:22:03 EDT 2008


>
> i don't know how i would get around the problem, though, because i'd have 
> to know how to access the deque object that my class stores when i do 
> deque.__init__ in my constructor, so that i could pickle it and my class 
> variables separately.
>
>

i decided i could just pickle deque(self), which should return a regular 
deque object with the data from self, and then in the load routine make a 
pdeque object from it.

that, of couse, gives me another error.  'collections.deque' object has no 
attribute 'write'.  from the line 'self.write = file.write', which is in 
pickle.py
pickling list(self) doesnt work either.








More information about the Python-list mailing list