python - How do I turn this into a one line generator? -


my best attempts have failed:

for s in self.services:   m in s.messages: yield m 

itertools.chain.from_iterable(s.messages s in self.services)


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -