Simplify with built-in functions where possible. e.g.
change [x for x in y if x] to filter(None, y) change [f(x) for x in y] to map(f, x) change [x for x in y] to list(y) These changes reduce source code size and complexity and produce some minor performance gains svn: r14104
This commit is contained in:
@ -578,7 +578,7 @@ class ExtractCity(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
||||
return
|
||||
|
||||
def toggled(self, cell, path_string):
|
||||
path = tuple([int (i) for i in path_string.split(':')])
|
||||
path = tuple(map(int, path_string.split(':')))
|
||||
row = self.model[path]
|
||||
row[0] = not row[0]
|
||||
|
||||
|
Reference in New Issue
Block a user