LAMBDA IS IT USELESS?

Fredrik Lundh fredrik at pythonware.com
Sat Jul 14 04:25:26 EDT 2001


Bengt Richter wrote:
> In that case why not allow an anonymous version of def, e.g..,
>
>     map(
>         def(x):
>             x**2
>         ,xrange(5))

you forgot something:

     map(
         def(x):
             return x**2
         , xrange(5))

Cheers /F





More information about the Python-list mailing list