From: Guido van Rossum Date: Wed, 6 Jan 1999 23:34:39 +0000 (+0000) Subject: Explain how come that pickle and cPickle, while using the same data X-Git-Tag: v1.5.2b2~428 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf3ce92ef4437ff028aea25f7e7e98a35ba30b49;p=thirdparty%2FPython%2Fcpython.git Explain how come that pickle and cPickle, while using the same data format, can produce different pickle strings for the same object. --- diff --git a/Doc/lib/libpickle.tex b/Doc/lib/libpickle.tex index 6f9ece7c6c7c..cdfe3b793604 100644 --- a/Doc/lib/libpickle.tex +++ b/Doc/lib/libpickle.tex @@ -294,3 +294,9 @@ subclassed. This should not be an issue in most cases. The format of the pickle data is identical to that produced using the \module{pickle} module, so it is possible to use \module{pickle} and \module{cPickle} interchangably with existing pickles. + +(Since the pickle data format is actually a tiny stack-oriented +programming language, and there are some freedoms in the encodings of +certain objects, it's possible that the two modules produce different +pickled data for the same input objects; however they will always be +able to read each others pickles back in.)