Replace dict.has_key() calls with "in" and "not in" operators.
svn path=/main/trunk/; revision=10871
def _delitem(self, cpv):
value = self[cpv] # validates whiteout and/or raises a KeyError when necessary
- if self.db_ro.has_key(cpv):
+ if cpv in self.db_ro:
self.db_rw[cpv] = self._create_whiteout(value)
else:
del self.db_rw[cpv]
# so we store only what's handed to us and is a known key
db_values = []
for key in self._known_keys:
- if values.has_key(key) and values[key] != '':
+ if key in values and values[key]:
db_values.append({"key":key, "value":values[key]})
if len(db_values) > 0: