[Python-3000] Python 3000 Status Update (Long!)

Christian Heimes lists at cheimes.de
Tue Jun 19 15:05:42 CEST 2007


Gábor Farkas wrote:
> why does map and filter stay, but reduce leaves?
> 
> i understand that some people think that an explicit for-loop is more 
> understandable, but also many people claim that list-comprehensions are 
> more understandable than map/filter.., and map/filter can be trivially 
> written using list-comprehensions.. so why  _reduce_?

Don't worry, it wasn't complete removed. Reduce was moved to functools

$ ./python
Python 3.0x (p3yk:56022, Jun 18 2007, 21:10:13)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> map
<built-in function map>
>>> filter
<built-in function filter>
>>> from functools import reduce
>>> reduce
<built-in function reduce>



More information about the Python-3000 mailing list