Python3: on removing map, reduce, filter

Andrey Tatarinov elephantum at dezcom.mephi.ru
Sun Jan 9 09:32:55 EST 2005


Paul Rubin wrote:
>>How does GvR suggestions on removing map(), reduce(), filter()
>>correlate with the following that he wrote himself (afaik):
>>http://www.python.org/doc/essays/list2str.html
> 
> I think that article was written before list comprehensions were added
> to Python.

anyway list comprehensions are just syntaxic sugar for

 >>> for var in list:
 >>>     smth = ...
 >>>     res.append(smth)

(is that correct?)

so there will be no speed gain, while map etc. are C-implemented



More information about the Python-list mailing list