
June 21, 2009
2:51 a.m.
Terry Reedy wrote:
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.
tjr
I hate it. It mixes map/filter style and comprehension style; and the fact it does so in a single line only makes it worse. Not that it would be any better in two lines.