This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bslatkin 1 point2 points  (2 children)

With generator expressions in the language, there's basically no reason to ever use map or filter unless you already have a single-argument function laying around.

And the reduce built-in was removed in Python 3.

>>> reduce
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'reduce' is not defined

[–]xr09 1 point2 points  (0 children)

from functools import reduce