Python newbie needs constructive suggestions
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Sat Jul 22 15:31:26 EDT 2006
Lawrence D'Oliveiro a écrit :
> In message <mailman.8409.1153526071.27775.python-list at python.org>,
> davew-python at cs.haverford.edu wrote:
>
>
>> b) give up on using an anonymous function and create a named "successor"
>> function with "def",
>
>
> This is what you have to do.
Not necessarily.
map(lambda x, one=1: one + x, range(42))
> For some reason mr van Rossum has this aversion
> to anonymous functions, and tries to cripple them as much as possible.
For some reasons, including the fact that Python is statement based and
have significative indentation, it's actually not trivial to come with a
better syntax for lambdas. The horse has been beaten to hell and back,
and no one managed to propose anything worth implementing so far. But if
you have the solution to this problem, please share...
More information about the Python-list
mailing list