New submission from Alberto Planas Domínguez <apla...@gmail.com>: Sometimes, when I use cPickle to serialize tuples of strings, I get different dumps() result for the same tuple:
import cPickle t = ('<s>', 'JOHN') s1 = cPickle.dumps(t) s2 = cPickle.dumps(cPickle.loads(cPickle.dumps(t))) assert s1 == s2 # AssertionError With cPickle doesn't matter what protocol use por dumps(). The assertion is Ok if I use the pickle module instead of cPickle. This means that I can't use a serialized object as a key in a map/dict object. ---------- messages: 105896 nosy: Alberto.Planas.Domínguez priority: normal severity: normal status: open title: cPickle dumps(tuple) != dumps(loads(dumps(tuple))) type: behavior versions: Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8738> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com