[Python-checkins] python/dist/src/Doc/lib libpickle.tex,1.52,1.53

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sun Dec 5 06:20:44 CET 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15207/Doc/lib

Modified Files:
	libpickle.tex 
Log Message:
Removed the deprecated bin parameter from the pickle module.

Index: libpickle.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libpickle.tex,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- libpickle.tex	7 Aug 2004 20:25:55 -0000	1.52
+++ libpickle.tex	5 Dec 2004 05:20:41 -0000	1.53
@@ -144,14 +144,10 @@
 or \constant{HIGHEST_PROTOCOL},
 the highest protocol version available will be used.
 
-\versionchanged[The \var{bin} parameter is deprecated and only provided
-for backwards compatibility.  You should use the \var{protocol}
-parameter instead]{2.3}
+\versionchanged[Introduced the \var{protocol} parameter]{2.3}
 
 A binary format, which is slightly more efficient, can be chosen by
-specifying a true value for the \var{bin} argument to the
-\class{Pickler} constructor or the \function{dump()} and \function{dumps()}
-functions.  A \var{protocol} version >= 1 implies use of a binary format.
+specifying a \var{protocol} version >= 1.
 
 \subsection{Usage}
 
@@ -170,24 +166,17 @@
 The \module{pickle} module provides the
 following functions to make this process more convenient:
 
-\begin{funcdesc}{dump}{obj, file\optional{, protocol\optional{, bin}}}
+\begin{funcdesc}{dump}{obj, file\optional{, protocol}}
 Write a pickled representation of \var{obj} to the open file object
 \var{file}.  This is equivalent to
-\code{Pickler(\var{file}, \var{protocol}, \var{bin}).dump(\var{obj})}.
+\code{Pickler(\var{file}, \var{protocol}).dump(\var{obj})}.
 
 If the \var{protocol} parameter is omitted, protocol 0 is used.
 If \var{protocol} is specified as a negative value
 or \constant{HIGHEST_PROTOCOL},
 the highest protocol version will be used.
 
-\versionchanged[The \var{protocol} parameter was added.
-The \var{bin} parameter is deprecated and only provided
-for backwards compatibility.  You should use the \var{protocol}
-parameter instead]{2.3}
-
-If the optional \var{bin} argument is true, the binary pickle format
-is used; otherwise the (less efficient) text pickle format is used
-(for backwards compatibility, this is the default).
+\versionchanged[Introduced the \var{protocol} parameter]{2.3}
 
 \var{file} must have a \method{write()} method that accepts a single
 string argument.  It can thus be a file object opened for writing, a
@@ -211,7 +200,7 @@
 written in binary mode or not.
 \end{funcdesc}
 
-\begin{funcdesc}{dumps}{obj\optional{, protocol\optional{, bin}}}
+\begin{funcdesc}{dumps}{obj\optional{, protocol}}
 Return the pickled representation of the object as a string, instead
 of writing it to a file.
 
@@ -220,14 +209,8 @@
 or \constant{HIGHEST_PROTOCOL},
 the highest protocol version will be used.
 
-\versionchanged[The \var{protocol} parameter was added.
-The \var{bin} parameter is deprecated and only provided
-for backwards compatibility.  You should use the \var{protocol}
-parameter instead]{2.3}
+\versionchanged[The \var{protocol} parameter was added]{2.3}
 
-If the optional \var{bin} argument is
-true, the binary pickle format is used; otherwise the (less efficient)
-text pickle format is used (this is the default).
 \end{funcdesc}
 
 \begin{funcdesc}{loads}{string}
@@ -262,7 +245,7 @@
 objects can actually be unpickled.  See section~\ref{pickle-sub} for
 more details.}, \class{Pickler} and \class{Unpickler}:
 
-\begin{classdesc}{Pickler}{file\optional{, protocol\optional{, bin}}}
+\begin{classdesc}{Pickler}{file\optional{, protocol}}
 This takes a file-like object to which it will write a pickle data
 stream.  
 
@@ -270,13 +253,7 @@
 If \var{protocol} is specified as a negative value,
 the highest protocol version will be used.
 
-\versionchanged[The \var{bin} parameter is deprecated and only provided
-for backwards compatibility.  You should use the \var{protocol}
-parameter instead]{2.3}
-
-Optional \var{bin} if true, tells the pickler to use the more
-efficient binary pickle format, otherwise the \ASCII{} format is used
-(this is the default).
+\versionchanged[Introduced the \var{protocol} parameter]{2.3}
 
 \var{file} must have a \method{write()} method that accepts a single
 string argument.  It can thus be an open file object, a
@@ -289,7 +266,7 @@
 \begin{methoddesc}[Pickler]{dump}{obj}
 Write a pickled representation of \var{obj} to the open file object
 given in the constructor.  Either the binary or \ASCII{} format will
-be used, depending on the value of the \var{bin} flag passed to the
+be used, depending on the value of the \var{protocol} argument passed to the
 constructor.
 \end{methoddesc}
 
@@ -451,7 +428,7 @@
 \method{__init__()} method be called on unpickling, an old-style class
 can define a method \method{__getinitargs__()}, which should return a
 \emph{tuple} containing the arguments to be passed to the class
-constructor (i.e. \method{__init__()}).  The
+constructor (\method{__init__()} for example).  The
 \method{__getinitargs__()} method is called at
 pickle time; the tuple it returns is incorporated in the pickle for
 the instance.



More information about the Python-checkins mailing list