[Python-Dev] Re: [Python Dev] PEP 309

Nick Coghlan ncoghlan at iinet.net.au
Tue Mar 1 11:16:58 CET 2005


Steven Bethard wrote:
> (I'm also secretly hoping that map, filter,
> reduce, etc. will be moved to the functional module in the future,
> maybe in Python 3.0.  But that's probably just my love for list
> comprehensions and generator expressions speaking.) ;-)

Given Guido's stated desire to get rid of those three, but also given the fact 
that sometimes they're just plain clearer than the equivalent list comp (e.g. 
performing a type conversion on an entire list), having the functional module as 
a place to eventually put them seemed like a fine idea to me.

I'm actually half-tempted to suggest that those three functions should be 
aliased in the functional module for 2.5 (in addition to being in builtins - ala 
the contents of the exceptions module).

I also agree with your other point - with a functional module in place, it 
becomes more feasible to give the functional programming folks a few extra tools 
without impacting too badly on those people that *aren't* interested in FP 
related stuff.

Cheers,
Nick.
Maybe we should open a book on the next method to make it into functional. 
Compose, perhaps?

-- 
Nick Coghlan   |   ncoghlan at email.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.skystorm.net


More information about the Python-Dev mailing list