A replacement for lambda
spam.csubich+block at block.subich.spam.com
Sun Jul 31 04:25:25 CEST 2005
> why (x**2 with(x))<(x**3 with(x)) is not taken in consideration?
Looks too much like a generator expression for my taste. Also, <expr
..> syntax could be used with 'for' instead of 'with' if PEP343 poses a
problem, whereas (expr for params) is identically a generator expression.
> If 'with' must be there (and substitue 'lambda:') then at least the
> syntax is clear.IMO Ruby syntax is also clear.
I haven't used Ruby myself, but as I understand it that language allows
for full anonymous blocks. Python probably doesn't want to do that.
More information about the Python-list