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:
@@ -174,8 +174,7 @@ class GeneWebWriter(object):
|
||||
if not option_box.cfilter.is_empty():
|
||||
self.db = gen.proxy.FilterProxyDb(self.db, option_box.cfilter)
|
||||
|
||||
for p in self.db.iter_person_handles():
|
||||
self.plist[p] = 1
|
||||
self.plist.update([p, 1] for p in self.db.iter_person_handles())
|
||||
|
||||
self.flist = {}
|
||||
for key in self.plist:
|
||||
|
||||
Reference in New Issue
Block a user