summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-02-25 23:17:41 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-02-25 23:17:41 (GMT)
commit39df66179f31a74fbbfb9fc8a4ef57ba1833c0b2 (patch)
tree98cc9a34ce506b94c386d24a0dc66fa0103a68f7
parent9d63837e9b9f4163e4019257f5c15b8007c8ad2e (diff)
downloadcpython-39df66179f31a74fbbfb9fc8a4ef57ba1833c0b2.zip
cpython-39df66179f31a74fbbfb9fc8a4ef57ba1833c0b2.tar.gz
cpython-39df66179f31a74fbbfb9fc8a4ef57ba1833c0b2.tar.bz2
Revert part of r60927 which made invalid assumptions about the API offered by db modules.
-rw-r--r--Lib/shelve.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/shelve.py b/Lib/shelve.py
index f1a468e..7a75445 100644
--- a/Lib/shelve.py
+++ b/Lib/shelve.py
@@ -95,13 +95,13 @@ class Shelf(UserDict.DictMixin):
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