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:
@ -1750,8 +1750,7 @@ class RelationshipCalculator(object):
|
||||
subscribed
|
||||
"""
|
||||
dbstate.disconnect(self.state_signal_key)
|
||||
for key in self.signal_keys:
|
||||
dbstate.db.disconnect(key)
|
||||
map(dbstate.db.disconnect, self.signal_keys)
|
||||
self.storemap = False
|
||||
self.stored_map = None
|
||||
|
||||
|
Reference in New Issue
Block a user