mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
remove most uses of list(somedict.keys()) in Demo scripts
This commit is contained in:
parent
28a181cbe8
commit
1e8ce58f5d
17 changed files with 31 additions and 46 deletions
|
|
@ -20,7 +20,7 @@ class EnumMetaclass(type):
|
|||
def __init__(cls, name, bases, dict):
|
||||
super(EnumMetaclass, cls).__init__(name, bases, dict)
|
||||
cls._members = []
|
||||
for attr in list(dict.keys()):
|
||||
for attr in dict.keys():
|
||||
if not (attr.startswith('__') and attr.endswith('__')):
|
||||
enumval = EnumInstance(name, attr, dict[attr])
|
||||
setattr(cls, attr, enumval)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue