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
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
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
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
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