Fixed #28249 -- Removed unnecessary dict.keys() calls.

iter(dict) is equivalent to iter(dict.keys()).
This commit is contained in:
Jon Dufresne 2017-05-27 16:08:46 -07:00 committed by Tim Graham
parent 2a5708a304
commit 21046e7773
43 changed files with 84 additions and 85 deletions

View file

@ -82,7 +82,7 @@ def lazy(func, *resultclasses):
def __prepare_class__(cls):
for resultclass in resultclasses:
for type_ in resultclass.mro():
for method_name in type_.__dict__.keys():
for method_name in type_.__dict__:
# All __promise__ return the same wrapper method, they
# look up the correct implementation when called.
if hasattr(cls, method_name):