[Python-ideas] Start argument for itertools.accumulate() [Was: Proposal: A Reduce-Map Comprehension and a "last" builtin]
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Apr 9 05:15:27 EDT 2018
Raymond Hettinger wrote:
> I don't want to overstate the case, but I do think a function signature that
> offers a "first_value" option is an invitation to treat the first value as
> being distinct from the rest of the data stream.
I conjecture that the initial value is *always* special,
and the only cases where it seems not to be are where
you're relying on some implicit initial value such as
zero.
--
Greg
More information about the Python-ideas
mailing list