Make 'bin' argument trigger DeprecationWarning

This commit is contained in:
Andrew M. Kuchling 2004-08-07 16:27:24 +00:00
parent cbbee6fed5
commit dc54f2be3f

View file

@ -199,7 +199,7 @@ def __init__(self, file, protocol=None, bin=None):
raise ValueError, "can't specify both 'protocol' and 'bin'"
if bin is not None:
warnings.warn("The 'bin' argument to Pickler() is deprecated",
PendingDeprecationWarning)
DeprecationWarning)
protocol = bin
if protocol is None:
protocol = 0