replace has_key with 'in' operator

This commit is contained in:
Benjamin Peterson 2009-10-09 22:15:50 +00:00
parent de0559998f
commit 6e3dbbdf39
29 changed files with 71 additions and 71 deletions

View file

@ -335,10 +335,10 @@ def __forwardmethods(fromClass, toClass, toPart, exclude = ()):
if ex[:1] == '_' or ex[-1:] == '_':
del _dict[ex]
for ex in exclude:
if _dict.has_key(ex):
if ex in _dict:
del _dict[ex]
for ex in __methods(fromClass):
if _dict.has_key(ex):
if ex in _dict:
del _dict[ex]
for method, func in _dict.items():