better lambda support in the future?

Michael DeHaan michael.dehaan at gmail.com
Fri Dec 17 16:20:06 EST 2004


True enough, but suppose you want a hash of anonymous functions as
opposed to just a lexical?   This is where lambas are nice to have.  
Totally agreed about a small use here and there, but they do have some
use in dispatch tables, as they are a lot easier to read sometimes
than very long case statements.    Of course, this would require
multi-line lambdas to exist...

--Michael

> I assume that the point you were trying to make is that:
> 
> def f(*args):
>      return expr
> 
> is equivalent to
> 
> f = lambda *args: expr
> 
> ?
> 
> Steve
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list