Added info about the new HIGHEST_PROTOCOL module constant.
This commit is contained in:
parent
fa6660b886
commit
6f28699bc4
|
@ -87,7 +87,12 @@ Protocol versions
|
|||
Python versions had the same effect as passing 1. Nevertheless, a
|
||||
special case is added here: passing a negative number selects the
|
||||
highest protocol version supported by a particular implementation.
|
||||
This works in previous Python versions, too.
|
||||
This works in previous Python versions, too, and so can be used to
|
||||
select the highest protocol available in a way that's both backward
|
||||
and forward compatible. In addition, a new module constant
|
||||
HIGHEST_PROTOCOL is supplied by both pickle and cPickle, equal to
|
||||
the highest protocol number the module can read. This is cleaner
|
||||
than passing -1, but cannot be used before Python 2.3.
|
||||
|
||||
The pickle.py module has supported passing the 'bin' value as a
|
||||
keyword argument rather than a positional argument. (This is not
|
||||
|
|
Loading…
Reference in New Issue