Commit 9d32bb17 authored by Guido van Rossum's avatar Guido van Rossum

Rename 'bin' arg to 'proto'. Keep the default at 0 lest the tests

change in meaning.
parent 3b769835
......@@ -18,9 +18,9 @@ class PicklerTests(AbstractPickleTests):
error = KeyError
def dumps(self, arg, bin=0):
def dumps(self, arg, proto=0):
f = StringIO()
p = pickle.Pickler(f, bin)
p = pickle.Pickler(f, proto)
p.dump(arg)
f.seek(0)
return f.read()
......@@ -32,12 +32,12 @@ class PicklerTests(AbstractPickleTests):
class PersPicklerTests(AbstractPersistentPicklerTests):
def dumps(self, arg, bin=0):
def dumps(self, arg, proto=0):
class PersPickler(pickle.Pickler):
def persistent_id(subself, obj):
return self.persistent_id(obj)
f = StringIO()
p = PersPickler(f, bin)
p = PersPickler(f, proto)
p.dump(arg)
f.seek(0)
return f.read()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment