can Python be useful as functional?

Bryan Olson fakeaddress at nowhere.org
Wed Sep 19 00:08:23 EDT 2007


Rustom Mody asked:
> [...] why does
> 
> (yield(x) for x in si(l) if x % p != 0)
> 
> not work? I would have expected generator expression to play better
> with generators.

You have a statement, "yield(x)", where the construct requires
an expression.


-- 
--Bryan



More information about the Python-list mailing list