A replacement for lambda

Christopher Subich spam.csubich+block at block.subich.spam.com
Sat Jul 30 22:27:20 EDT 2005

Paddy wrote:
> Christopher Subich <spam.csubich+bl... at block.subich.spam.com> 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.

More information about the Python-list mailing list