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/033378.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?Tim Peters tim.one@comcast.net
Thu, 13 Feb 2003 10:14:39 -0500
[Gareth McCaughan]
> 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. :-)

I'm going to add HIGHEST_PROTOCOL = 2 for 2.3 -- thanks for the idea.

Note that it doesn't address quite the same problem, though:  it won't exist
before 2.3, so current code can't use it.  You can pass -1 today to get the
highest protocol available (more by accident than by design), and your code
will continue to get the highest available in 2.3 without further ado.
 BTW, -1 didn't bother me:  I viewed it as indexing into a (conceptual) list
of available protocol numbers.  -1 generally has a "get the last" meaning,
and we'll conveniently ignore that -716 had the same meaning here <wink>.




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