[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-24 Thread Lisa Roach
Change by Lisa Roach : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-23 Thread Lisa Roach
Lisa Roach added the comment: New changeset 9718b59ee5f2416cdb8116ea5837b062faf0d9f8 by Lisa Roach in branch 'master': bpo-34659: Adds initial kwarg to itertools.accumulate() (GH-9345) https://github.com/python/cpython/commit/9718b59ee5f2416cdb8116ea5837b062faf0d9f8 --

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: > As for pickling/copying, this task is technically difficult, > it but I don't see principal problems. I've added the pickle/copy support to the PR. > is it worth to add it? Tim was persuasive, so I've agreed to add the feature. It may be little used

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-18 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I think I'll pass Raymond, its been so long since I've contributed, in the mean time there is github and argument clinic and whatnot so I'm out of training. I´m lurking around these parts and maybe shall return one day :) --

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The first issue, with ignoring initial=None, is complex because Argument Clinic and the inspect module don't support optional parameters without default value. It could be possible to use optional groups, but currently Argument Clinic supports optional

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-17 Thread Tim Peters
Tim Peters added the comment: Ya, I care: `None` was always intended to be an explicit way to say "nothing here", and using unique non-None sentinels instead for that purpose is needlessly convoluted. `initial=None` is perfect. But then I'm old & in the way ;-) -- nosy:

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Tim, do we care about whether "initial=None" versus "initial=_sentinel"? The former makes for a nice looking pure python equivalent and works nicely with the argument clinic to generate a signature. However, it precludes using None as the actual start

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +kristjan.jonsson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks like a duplicate of issue25193. See also a long discussion on the Python-ideas mailing list 5 months ago: [Start argument for itertools.accumulate()](https://mail.python.org/pipermail/python-ideas/2018-April/049649.html). -- nosy:

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-16 Thread Lisa Roach
Change by Lisa Roach : -- keywords: +patch pull_requests: +8769 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-13 Thread Lisa Roach
Lisa Roach added the comment: Happy to! I'll try to make a patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm open to adding the feature as a keyword-only argument. Lisa, would you like to bring this to fruition? -- assignee: rhettinger -> lisroach nosy: +lisroach ___ Python tracker

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-13 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-13 Thread R. David Murray
R. David Murray added the comment: Presumably because conceptually an 'initial value' would be like adding an additional element on to the front of the iterable being passed as an argument, and itertools is all about operating on iterables. I'm not saying such an argument could not be

[issue34659] Inconsistency between functools.reduce & itertools.accumulate

2018-09-13 Thread Azat Ishmukhametovich Ibrakov
New submission from Azat Ishmukhametovich Ibrakov : Why there is an optional `initial` parameter for `functools.reduce` function, but there is no such for `itertools.accumulate`, when they both are doing kind of similar things except that `itertools.accumulate` yields intermediate results