mirror of
https://github.com/python/cpython.git
synced 2025-11-02 22:51:25 +00:00
replace has_key with 'in' operator
This commit is contained in:
parent
de0559998f
commit
6e3dbbdf39
29 changed files with 71 additions and 71 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue