[Python-bugs-list] [ python-Bugs-640645 ] cPickle.dumps change after for
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 19 Nov 2002 04:05:33 -0800
Bugs item #640645, was opened at 2002-11-19 11:42
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=640645&group_id=5470
Category: Python Library
Group: Python 2.2.2
Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: Marco Beri (marcoberi)
Assigned to: Michael Hudson (mwh)
Summary: cPickle.dumps change after for
Initial Comment:
try this program:
import cPickle
a=([{}])
print cPickle.dumps(a)
for x in a:
pass
cPickle.dumps(a)
It prints:
(lp1
(da.
Why on earth it does dumps return different string?
And after just a for with a pass in it...
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2002-11-19 12:00
Message:
Logged In: YES
user_id=6656
Umm:
>>> a=([{}])
>>> cPickle.dumps(a)
'(lp1\n(da.'
you're only printing the first pickle...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=640645&group_id=5470