pickle.load() on an dictionary of dictionaries doesn't load full data structure on first call

James Pearson james.m.pearson at gmail.com
Sun Feb 22 19:15:40 EST 2009


I've been using irclib to write a simple irc bot, and I was running into
some difficulties with pickle.  Upon some experimentation with pdb, I found
that pickle.load() doesn't load *all* of the data the _first_ time it's
called.

For instance, I have this dictionary pickled:
{'xiong_chiamiov': {'name': 'James Pearson', 'distro': 'Arch'}}
The first time I pickle.load() it, I get this:
{'xiong_chiamiov': {'name': 'James Pearson'}}
The 2nd time, I get the full thing.

Is this a bug in pickle, something wrong with the way I'm approaching this,
or what?  Full code is available at: http://github.com/xiongchiamiov/mpu/

-- 
James Pearson
--
The best way to predict the future is to invent it.
 - Alan Kay
--
GCS/MU d- s+:- a--- C++(++++)>$ ULC+(++)>$ P(+) L+++>++++$ !E W++(+++)$>$
N+(++) o? K-- w--- O? M--(+) V? PS+(--) PE++() Y+(++) PGP- !t !5 !X R-
tv-(--) b+>+++ DI+(++) D G e>++ h- r y- [http://tinyurl.com/23uv8t]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090222/d20c9f03/attachment.html>


More information about the Python-list mailing list