[Python-3000] map, filter, reduce
Terry Reedy
tjreedy at udel.edu
Fri Jun 1 19:12:00 CEST 2007
"Jason Orendorff" <jason.orendorff at gmail.com> wrote in message
news:bb8868b90706010905p2dae12b7qc538cf25190c7127 at mail.gmail.com...
| PEP 3100 still isn't clear on the fate of these guys, except that
| reduce() is gone.
|
| How about moving all three to the functools module instead?
The current reduce is broken due to being a mashing together of two
versions of the function (one 2 params, the other 3), with the 3-param one
having an ill-formed signature (inconsistent parameter order) to allow the
mashing that should not have been done. (The ill-formed signature is hard
to remember and is responsible for part of some peoples' dislike of
reduce.) I would like a proper 3-param version in functools, but have not
writen the exact proposal yet since library changes have been put off.
I am also thinking about an ireduce, but need to make sure it cannot be
easily done with current itertools.
Terry Jan Reedy
More information about the Python-3000
mailing list