Replacement for lambda - 'def' as an expression?

Sybren Stuvel sybrenUSE at
Tue Sep 6 14:46:10 CEST 2005

talin at acm dot org enlightened us with:
> I'd be sad to see the notion of "anonymous functions" go

Same here. I think it's a beautyful concept, and very powerful. It
also allows for dynamic function creation in cases where a name would
not be available.

> What about passing an anonymous function as an argument, which is
> the most common case?

I don't really like that. The syntax is way too messy. Just the

    funcref = def(args):

syntax would suffice for me.

The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa

More information about the Python-list mailing list