Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 123dc8e

Browse files
author
Skip Montanaro
committed
self.binary -> self._binary to remove it from the public interface -
suggestion by Raymond Hettinger.
1 parent 3bf99e3 commit 123dc8e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/shelve.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Shelf(UserDict.DictMixin):
5353

5454
def __init__(self, dict, binary=False):
5555
self.dict = dict
56-
self.binary = binary
56+
self._binary = binary
5757

5858
def keys(self):
5959
return self.dict.keys()
@@ -78,7 +78,7 @@ def __getitem__(self, key):
7878

7979
def __setitem__(self, key, value):
8080
f = StringIO()
81-
p = Pickler(f, self.binary)
81+
p = Pickler(f, self._binary)
8282
p.dump(value)
8383
self.dict[key] = f.getvalue()
8484

0 commit comments

Comments
 (0)