[Python-checkins] python/dist/src/Lib pickle.py,1.158,1.159

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/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15207/Lib

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

Index: pickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pickle.py,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- pickle.py	7 Aug 2004 16:27:24 -0000	1.158
+++ pickle.py	5 Dec 2004 05:20:42 -0000	1.159
@@ -171,7 +171,7 @@
 
 class Pickler:
 
-    def __init__(self, file, protocol=None, bin=None):
+    def __init__(self, file, protocol=None):
         """This takes a file-like object for writing a pickle data stream.
 
         The optional protocol argument tells the pickler to use the
@@ -195,12 +195,6 @@
         object, or any other custom object that meets this interface.
 
         """
-        if protocol is not None and bin is not None:
-            raise ValueError, "can't specify both 'protocol' and 'bin'"
-        if bin is not None:
-            warnings.warn("The 'bin' argument to Pickler() is deprecated",
-                          DeprecationWarning)
-            protocol = bin
         if protocol is None:
             protocol = 0
         if protocol < 0:
@@ -1378,12 +1372,12 @@
 except ImportError:
     from StringIO import StringIO
 
-def dump(obj, file, protocol=None, bin=None):
-    Pickler(file, protocol, bin).dump(obj)
+def dump(obj, file, protocol=None):
+    Pickler(file, protocol).dump(obj)
 
-def dumps(obj, protocol=None, bin=None):
+def dumps(obj, protocol=None):
     file = StringIO()
-    Pickler(file, protocol, bin).dump(obj)
+    Pickler(file, protocol).dump(obj)
     return file.getvalue()
 
 def load(file):



More information about the Python-checkins mailing list