diff options
Diffstat (limited to 'Lib/shelve.py')
-rw-r--r-- | Lib/shelve.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/shelve.py b/Lib/shelve.py index 7a75445..f1a468e 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 self.dict.has_key(key) + return key in self.dict def __contains__(self, key): - return self.dict.has_key(key) + return key in self.dict def get(self, key, default=None): - if self.dict.has_key(key): + if key in self.dict: return self[key] return default |