A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-February/033377.html below:

[Python-Dev] when is binary mode required for pickle?

[Python-Dev] when is binary mode required for pickle? [Python-Dev] when is binary mode required for pickle?Gareth McCaughan gmccaughan@synaptics-uk.com
Thu, 13 Feb 2003 10:44:29 +0000
Guido wrote:

> For most people, yes.  "bin" is deprecated, "proto" should not be named
> (cPickle doesn't accept keyword arguments), and passing -1 is the best thing
> to do if you don't care about reading a pickle under an older version of
> Python than the one that wrote the pickle.  For compatibility reasons,
> though, the default proto value had to remain 0.

Suggestion: pickle.LATEST_PROTOCOL = cPickle.LATEST_PROTOCOL = -1 ?
(It could be spelled differently.) Or the string value "latest"
could be an acceptable value of proto. Or something. Anything rather
than magic numbers. :-)

-- 
g




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4