Fate of lambda, Functional Programming in Python...
Michael Hudson
mwh at python.net
Mon Aug 23 11:50:44 EDT 2004
Hans Nowak <hans at zephyrfalcon.org> writes:
> Anthony Baxter wrote:
>
> > First point: lambda, map, filter and reduce won't go away before
> > Python 3.0, at the very least. And, to be honest, I suspect
> > map/filter/reduce are much more likely to die than lambda, as they
> > can nearly always be expressed more clearly as listcomps or
> > genexprs.
>
> People often lump reduce in with the rest, but there's really no easy
> way to express a reduce with list comprehensions.
You can replace it with a for loop though, and TBH I think the change
is usually an improvement.
Cheers,
mwh
--
For their next act, they'll no doubt be buying a firewall
running under NT, which makes about as much sense as
building a prison out of meringue. -- -:Tanuki:-
-- http://home.xnet.com/~raven/Sysadmin/ASR.Quotes.html
More information about the Python-list
mailing list