Re: A replacement for lambda



Paddy wrote:
Christopher Subich <spam.csubich+bl...@xxxxxxxxxxxxxxxxxxxxx> writes:

Basically, I'd rewrite the Python grammar such that:
lambda_form ::= "<" expression "with" parameter_list ">"


I do prefer my parameter list to come before the expression. It would
remain consistant with simple function definitions.

Stylistic choice; I can appreciate your sentiment, but remember that this isn't exactly a function definition. It's a form of 'delayed expression.' Also, <... with ...> is nearly identical (identical if you replace 'with' with 'for') to existing list and generator comprehensions, so we'd get to stretch that idiom.
.