Use built-in functions to replace for loops:
Old code: for x in y: f(x) New Code: map(f, y) Also use defaultdict instead of simple dict when advantageous and use list comprehensions instead of for loops where map() could be used but requires lambdas. svn: r14135
This commit is contained in:
@ -1065,8 +1065,7 @@ class ViewManager(CLIManager):
|
||||
Disconnects the previous page, removing the old action groups
|
||||
and removes the old UI components.
|
||||
"""
|
||||
for mergeid in self.merge_ids:
|
||||
self.uimanager.remove_ui(mergeid)
|
||||
map(self.uimanager.remove_ui, self.merge_ids)
|
||||
|
||||
if self.active_page:
|
||||
self.active_page.set_inactive()
|
||||
|
Reference in New Issue
Block a user