diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-08-04 21:17:15 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-08-04 21:17:15 (GMT) |
commit | 753ecb13db3334e0368e9e9296a27e9132ce8894 (patch) | |
tree | b901970da6d23f7a14491801d2d09589c5410430 /Lib/shelve.py | |
parent | 5b3d3729baada9e8913a2f8556bbe041834c1b17 (diff) | |
download | cpython-753ecb13db3334e0368e9e9296a27e9132ce8894.zip cpython-753ecb13db3334e0368e9e9296a27e9132ce8894.tar.gz cpython-753ecb13db3334e0368e9e9296a27e9132ce8894.tar.bz2 |
Remove dict.has_key() usage in the shelve module to silence warnings under -3.
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 2a430f3..1f78fc1 100644 --- a/Lib/shelve.py +++ b/Lib/shelve.py @@ -105,13 +105,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 |