[Zope3-dev] Number of languages in Zope 3
Chris Withers
chrisw@nipltd.com
Mon, 14 Apr 2003 11:14:05 +0100
Guido van Rossum wrote:
> This particular example can be rewritten as a list comprehension:
>
> def getSnippetInfo(self):
> return [{'title': snippet.headline(version='Brief'),
> 'tease': snippet.teaseText(maxWords=100)}
> for snippet in self.context.values()
> if ISnippet.isImplementedBy(x)]
>
> which also avoids the dual looping thwt Chris asks about.
How does it do that?
Chris - learning something new every day ;-)