mirror of
https://github.com/python/cpython.git
synced 2025-09-13 12:17:24 +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
|
@ -112,7 +112,7 @@ class Dialog:
|
|||
def addchoices(self):
|
||||
self.choices = {}
|
||||
list = []
|
||||
for k, dc in list(self.options.items()):
|
||||
for k, dc in self.options.items():
|
||||
list.append((k, dc))
|
||||
list.sort()
|
||||
for k, (d, c) in list:
|
||||
|
@ -260,7 +260,7 @@ class WidgetDialog(Dialog):
|
|||
classes = {}
|
||||
for c in (self.classes,
|
||||
self.addclasses[self.klass]):
|
||||
for k in list(c.keys()):
|
||||
for k in c.keys():
|
||||
classes[k] = c[k]
|
||||
self.classes = classes
|
||||
|
||||
|
@ -273,7 +273,7 @@ class WidgetDialog(Dialog):
|
|||
def update(self):
|
||||
self.current = {}
|
||||
self.options = {}
|
||||
for k, v in list(self.configuration.items()):
|
||||
for k, v in self.configuration.items():
|
||||
if len(v) > 4:
|
||||
self.current[k] = v[4]
|
||||
self.options[k] = v[3], v[2] # default, klass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue