[Numpy-discussion] unpickle

Frank Lagor dfranci at seas.upenn.edu
Wed Nov 19 23:36:59 EST 2008


I have only used pickle a little and I did not see this in the docstring:

Is there anyway to unpickle in reverse order?

It appears the pickling works like a queue.

I execute:
pickle.dump(obj1,file)
pickle.dump(obj2,file)

Then when I go to retrieve:
pickle.load(file) returns obj1
pickle.load(file) returns obj2

I am looking for a quick way to grab the last thing pickled (like a stack
instead).

Thanks in advance,
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20081119/58d4f3c4/attachment.html>


More information about the NumPy-Discussion mailing list