[issue5518] cPickle produces inconsistent output
"Martin v. Löwis" <report@bugs.python.org> at psf.upfronthosting.co.za
"Martin v. Löwis" <report@bugs.python.org> at psf.upfronthosting.co.za
Fri Mar 20 00:01:27 CET 2009
Martin v. Löwis <martin at v.loewis.de> added the comment:
I'm not quite sure why you expect them to be the same. The inputs are
different, after all - in one case, you have a Unicode object with a
single reference to it (from the tuple), in the second case, you have a
Unicode object with many more references:
py> sys.getrefcount(key[1])
2
py> sys.getrefcount((1,u'foo')[1])
5
That makes a difference for cPickle.
----------
nosy: +loewis
resolution: -> invalid
status: open -> pending
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5518>
_______________________________________
More information about the Python-bugs-list
mailing list