Martin v. Löwis <mar...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue5518>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to