diff options
author | Raymond Hettinger <python@rcn.com> | 2008-02-21 19:24:53 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-02-21 19:24:53 +0000 |
commit | 31ce5cb989da7a8362b7ea232fc263f0fb738a75 (patch) | |
tree | 676b71d92894661253c5ddf87fd785bbf6d146eb /Lib/shelve.py | |
parent | 8982cf5484e0203bc4505cdf13a5f797f477327a (diff) | |
download | cpython-git-31ce5cb989da7a8362b7ea232fc263f0fb738a75.tar.gz |
Update more instances of has_key().
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 7a75445b0b..f1a468e211 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 |