map/filter/reduce/lambda opinions and background unscientific mini-survey

Jp Calderone exarkun at divmod.com
Fri Jul 1 18:28:54 EDT 2005


On Fri, 01 Jul 2005 20:36:29 GMT, Ron Adam <rrr at ronadam.com> wrote:
>Tom Anderson wrote:
>
>> So, if you're a pythonista who loves map and lambda, and disagrees with
>> Guido, what's your background? Functional or not?
>
>I find map too limiting, so won't miss it.  I'm +0 on removing lambda
>only because I'm unsure that there's always a better alternative.
>
>So what would be a good example of a lambda that couldn't be replaced?

lambda can always be replaced.  Just like a for loop can always be replaced:

iterator = iter(<iterable>)
while True:
    try:
        <loop variable> = iterator.next()
    except StopIteration:
        break
    else:
        <loop body>

Let's get rid of for, too.

Jp



More information about the Python-list mailing list