diff options
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r-- | Lib/pickle.py | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index 7d6825fb0b..4c9188830a 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -171,7 +171,7 @@ del x 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 @@ class Pickler: 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 @@ try: 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): |