Python Tutorial Was: Guido's regrets: filter and map
Grant Edwards
grante at visi.com
Mon Nov 25 23:27:24 EST 2002
In article <sss5uus0o18jtdi2lcpp3605vfgscmvmum at 4ax.com>, Courageous wrote:
>>>> I never liked filter, map and reduce.
>>
>>So don't use them. ;)
>
> Lambda is an abortion, imo. It should be deprecated, and eventually
> removed from the language. It doesn't do what it set out to do particularly
> well, and suffers from the double sin of being a construct that is
> inherently anti-pythonic. The subset of list comprehensions that can
> be used to do what map/reduce-lambda do are an example of something
> that does what it was intended, is clear, and pythonic.
I find lambda quite useful for creating simple anonymous functions to pass
to GUIs as button commands and the like. I suppose the same effect could be
obtained by adding a couple more lines to define a temporarily-named
function, but then I'd have to think up a name. I've been known to waste
hours trying to come up with names for new computers. I'm not quite so
indecisive about functions, but it does seem to be one of my weak points.
--
Grant Edwards grante Yow! ... or were you
at driving the PONTIAC that
visi.com HONKED at me in MIAMI last
Tuesday?
More information about the Python-list
mailing list