[issue5518] cPickle produces inconsistent output

2009-03-20 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Sorry, I don't follow. I realise that the refcounts will be different; > but pickling an object should surely be independent of the refcount as > there is no need to include the refcount in the output? There certainly is a need to consider the refcount. Else

[issue5518] cPickle produces inconsistent output

2009-03-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: pickle is designed to provide persistent storage, not create keys for objects. Changes to the format are fine as long as they are compatible. -- nosy: +benjamin.peterson status: pending -> closed ___ Python tracke

[issue5518] cPickle produces inconsistent output

2009-03-20 Thread rb
rb added the comment: Martin, Sorry, I don't follow. I realise that the refcounts will be different; but pickling an object should surely be independent of the refcount as there is no need to include the refcount in the output? What other way (using pickle or not) can I convert a generic immut

[issue5518] cPickle produces inconsistent output

2009-03-19 Thread Martin v. Löwis
Martin v. Löwis 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

[issue5518] cPickle produces inconsistent output

2009-03-19 Thread rb
New submission from rb : The documentation states that the output of pickle and cPickle may be different. However it is implied that the output of a particular module will always be consistent within itself. This expectation fails for the case below. I am using the output of cPickle in order to