self.binary -> self._binary to remove it from the public interface -
suggestion by Raymond Hettinger.
This commit is contained in:
parent
3bf99e3e87
commit
123dc8ef72
@ -53,7 +53,7 @@ class Shelf(UserDict.DictMixin):
|
|||||||
|
|
||||||
def __init__(self, dict, binary=False):
|
def __init__(self, dict, binary=False):
|
||||||
self.dict = dict
|
self.dict = dict
|
||||||
self.binary = binary
|
self._binary = binary
|
||||||
|
|
||||||
def keys(self):
|
def keys(self):
|
||||||
return self.dict.keys()
|
return self.dict.keys()
|
||||||
@ -78,7 +78,7 @@ class Shelf(UserDict.DictMixin):
|
|||||||
|
|
||||||
def __setitem__(self, key, value):
|
def __setitem__(self, key, value):
|
||||||
f = StringIO()
|
f = StringIO()
|
||||||
p = Pickler(f, self.binary)
|
p = Pickler(f, self._binary)
|
||||||
p.dump(value)
|
p.dump(value)
|
||||||
self.dict[key] = f.getvalue()
|
self.dict[key] = f.getvalue()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user