[Python-checkins] r61074 - python/trunk/Lib/shelve.py
raymond.hettinger
python-checkins at python.org
Tue Feb 26 00:17:41 CET 2008
Author: raymond.hettinger
Date: Tue Feb 26 00:17:41 2008
New Revision: 61074
Modified:
python/trunk/Lib/shelve.py
Log:
Revert part of r60927 which made invalid assumptions about the API offered by db modules.
Modified: python/trunk/Lib/shelve.py
==============================================================================
--- python/trunk/Lib/shelve.py (original)
+++ python/trunk/Lib/shelve.py Tue Feb 26 00:17:41 2008
@@ -95,13 +95,13 @@
return len(self.dict)
def has_key(self, key):
- return key in self.dict
+ return self.dict.has_key(key)
def __contains__(self, key):
- return key in self.dict
+ return self.dict.has_key(key)
def get(self, key, default=None):
- if key in self.dict:
+ if self.dict.has_key(key):
return self[key]
return default
More information about the Python-checkins
mailing list