[Python-checkins] python/dist/src/Lib shelve.py,1.18,1.19

montanaro@users.sourceforge.net montanaro@users.sourceforge.net
2002年12月08日 13:25:02 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv21497
Modified Files:
	shelve.py 
Log Message:
self.binary -> self._binary to remove it from the public interface -
suggestion by Raymond Hettinger.
Index: shelve.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/shelve.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** shelve.py	8 Dec 2002 18:36:24 -0000	1.18
--- shelve.py	8 Dec 2002 21:25:00 -0000	1.19
***************
*** 54,58 ****
 def __init__(self, dict, binary=False):
 self.dict = dict
! self.binary = binary
 
 def keys(self):
--- 54,58 ----
 def __init__(self, dict, binary=False):
 self.dict = dict
! self._binary = binary
 
 def keys(self):
***************
*** 79,83 ****
 def __setitem__(self, key, value):
 f = StringIO()
! p = Pickler(f, self.binary)
 p.dump(value)
 self.dict[key] = f.getvalue()
--- 79,83 ----
 def __setitem__(self, key, value):
 f = StringIO()
! p = Pickler(f, self._binary)
 p.dump(value)
 self.dict[key] = f.getvalue()

AltStyle によって変換されたページ (->オリジナル) /