[Python-ideas] Accessing the result of comprehension's expression from the conditional
tjreedy at udel.edu
Sat Jun 20 21:07:23 CEST 2009
Steven D'Aprano wrote:
> On Sat, 20 Jun 2009 08:31:26 am Lie Ryan wrote:
> You don't like lambda? Fine, define an external function first. Then you
> can write:
> filter(pred, (f(x) for x in seq))
> There's no violation of DRY, there's no redundancy, there's no lambda,
> there's no "y" variable needed. What's ugly about it?
I think its great and that it kills any justification for the proposal.
More information about the Python-ideas