comparison bot.py @ 183:8f67684fee23

minor fix to Bot.findBridges(), memory usage improvement Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Fri, 19 Feb 2010 14:23:44 +0100
parents 803e00d72cb7
children 1e5308a0db55
comparison
equal deleted inserted replaced
182:60ee2b914616 183:8f67684fee23
698 698
699 699
700 def findBridges(self, str_array): 700 def findBridges(self, str_array):
701 # TODO: lock self.bridges for thread safety 701 # TODO: lock self.bridges for thread safety
702 bridges = [b for b in self.bridges] 702 bridges = [b for b in self.bridges]
703 for bridge in [b for b in bridges]: 703 for bridge in self.bridges:
704 for s in str_array: 704 for s in str_array:
705 if not s in str(bridge): 705 if not s in str(bridge):
706 bridges.remove(bridge) 706 bridges.remove(bridge)
707 break 707 break
708 return bridges 708 return bridges