[issue25193] itertools.accumlate should have an optional initializer argument
Raymond Hettinger
report at bugs.python.org
Mon Sep 21 03:28:33 CEST 2015
Raymond Hettinger added the comment:
I know this was considered at the beginning but I am not immediately remembering what the reason was for not doing it (however, I do remember looking to APL to see what was done for their well thought-out implementation of accumulate).
AFAIK, the case you sketched-out (computing running totals for four factorial starting from an initial product of 10) just doesn't come-up in the real-world. I'm reluctant to have API feature-creep without strong use cases (it just makes the tool more complicated to learn, remember, and use). When I get a chance, I'll go to github and run a code search to see whether people are routinely have to do a chain() operation to prepend a starting point; if it isn't rare, then there would be a better case for API expansion; if it is rate, then it goes in the it-isn't-worth it category.
----------
priority: normal -> low
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25193>
_______________________________________
More information about the Python-bugs-list
mailing list