> Wheres a lambda expression can be passed anonymously to any other function as
> an argument.
>
> map(lambda x: x**2, array)
>
> vs
>
> def powers2(x)
> x**2
> map(powers2, array)
>
> Coming up with a name here is not needed, as the operation is expressive
> enough.
Sure, but there is a well known convention for such non-names already: meta
syntactical variables. In this case the name could be "foo" and all readers
will interpret this as "no name".
I admit to have wanted lambdas that are just as powerful as normal functions,
but often when I want it the code is nicer when a normal function is used.
/ Anders
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/