pickle, cPickle, zlib, and the future

Martin v. Loewis martin at v.loewis.de
Fri Mar 1 16:37:53 EST 2002


xscottgjunk at yahoo.com (Scott Gilbert) writes:

> I figure this was either planned or lucky.  If it was planned, a quick
> comment in the source would relax my fears that my code won't break in
> the next version of Python.  If it was lucky, it might be nice to jump
> on the opportunity.

I guess it was lucky.

> So can I rely on the first character 'x' being reserved for zlib, and
> cPickle/pickle strings never starting with 'x'?

At the moment, no. If you can point to some zlib documentation that
explains what the 'x' on each output does (*), feel free to submit a
patch to the pickle implementations that documents (in a comment) that
letter as being reserved for this purpose; it seems no harm is done
doing so. Please submit that patch to sf.net/projects/python.

Regards,
Martin



More information about the Python-list mailing list