Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def on_message(self, message):
- print message
- for x in self.connections:
- if x['id'] == self:
- print 'found something'
- x['keyword'] = message
- print x['keyword']
- print x
- for dict in self.connections:
- if dict['id'] == self:
- dict['keyword'] = 'updated'
- for dict in [dict for dict in self.connections if dict['id'] == self]:
- dict['keyword'] == 'updated'
- for dict in self.connections:
- if dict['id'] == self:
- self.connections.remove(dict)
Add Comment
Please, Sign In to add comment