[Tutor] pickle problems

Richard D. Moores rdmoores at gmail.com
Sun Aug 12 00:30:22 CEST 2012


64-bit Win 7
Python 3.2.3 (default, Apr 11 2012, 07:12:16) [MSC v.1500 64 bit (AMD64)]

I wrote pickle_attempt.py as an exercise to try to learn to use the
pickle module. See the version I edited for Tutor,
pickle_attempt_for_web.py at
<http://pastebin.com/SNwKRuSK>.

To show the problems, I've pasted relevant outputs below the code.

The lines 117-145 output shows the adding of items 3000000-3000009,
but also that the 2000000-2000009 items are missing from dictionary D.
Similarly for the 147-174 output.

Further below I show the adding, one-by-one, items 100, 101, and 103.
But after closing the program and restarting it, those items have
disappeared from D.

Advice, please.

Dick Moores


More information about the Tutor mailing list