
July 16, 2009
3:28 a.m.
Carl Johnson wrote:
Surely, you meant
foo(f, g) where: def f(x): ... def g(y): ...
Yes, that's what I meant.
new_list = [fx for f in fs if fx] where: fx = f(x)
No, there would have to be a separate, analogous extension to list comprehensions: new_list = [fx for f in fs if fx where fx = f(x)] or maybe new_list = [fx where fx = f(x) for f in fs if fx] -- Greg