summaryrefslogtreecommitdiffstats
path: root/Demo/metaclasses
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2007-08-06 21:07:53 (GMT)
committerSkip Montanaro <skip@pobox.com>2007-08-06 21:07:53 (GMT)
commit1e8ce58f5d0db22714d65ff440045a7526ed394d (patch)
treef705fb923334cffa32492a5bddfcca46ecc27f0a /Demo/metaclasses
parent28a181cbe82bc79df3b881b79b19e12b2e39911b (diff)
downloadcpython-1e8ce58f5d0db22714d65ff440045a7526ed394d.zip
cpython-1e8ce58f5d0db22714d65ff440045a7526ed394d.tar.gz
cpython-1e8ce58f5d0db22714d65ff440045a7526ed394d.tar.bz2
remove most uses of list(somedict.keys()) in Demo scripts
Diffstat (limited to 'Demo/metaclasses')
-rw-r--r--Demo/metaclasses/Enum.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Demo/metaclasses/Enum.py b/Demo/metaclasses/Enum.py
index 8d402db..eb52d79 100644
--- a/Demo/metaclasses/Enum.py
+++ b/Demo/metaclasses/Enum.py
@@ -42,7 +42,7 @@ class EnumMetaClass:
self.__name__ = name
self.__bases__ = bases
self.__dict = {}
- for key, value in list(dict.items()):
+ for key, value in dict.items():
self.__dict[key] = EnumInstance(name, key, value)
def __getattr__(self, name):
@@ -80,7 +80,7 @@ class EnumMetaClass:
s = s + '(' + string.join([x.__name__ for x in self.__bases__], ", ") + ')'
if self.__dict:
list = []
- for key, value in list(self.__dict.items()):
+ for key, value in self.__dict.items():
list.append("%s: %s" % (key, int(value)))
s = "%s: {%s}" % (s, string.join(list, ", "))
return s