[issue31141] Start should be a keyword argument of the built-in sum

2018-09-12 Thread STINNER Victor
Change by STINNER Victor : -- resolution: out of date -> duplicate ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue31141] Start should be a keyword argument of the built-in sum

2018-09-12 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> out of date stage: -> resolved status: open -> closed superseder: -> Make *start* usable as a keyword argument for sum(). ___ Python tracker

[issue31141] Start should be a keyword argument of the built-in sum

2018-04-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In 2.6 it was "sequence". -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue31141] Start should be a keyword argument of the built-in sum

2018-04-26 Thread STINNER Victor
STINNER Victor added the comment: > I don't think it is worth to allow passing the first argument as a keyword > argument. I concur. Would you mind to add a test to make sure that passing the first argument as the "iterable" keyword doesn't work? "iterable" name comes from the Doc/library/fu

[issue31141] Start should be a keyword argument of the built-in sum

2018-04-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: First than to allow this argument be passes by keyword, we mast choose its name. See the discussion "Start argument for itertools.accumulate()" on Python-ideas (https://mail.python.org/pipermail/python-ideas/2018-April/049649.html). -- ___

[issue31141] Start should be a keyword argument of the built-in sum

2018-04-26 Thread Cheryl Sabella
Cheryl Sabella added the comment: Hi Mark, Are you able to make the Argument Clinic change the Serhiy suggested to come up with new benchmarks? Thanks! -- nosy: +csabella ___ Python tracker _

[issue31141] Start should be a keyword argument of the built-in sum

2017-08-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Your tests show that there is a performance regression of getting rid of Argument Clinic (in addition to increasing the maintenance cost of the code that was generated previously). Try to use the simple Argument Clinic change (it can has non-zero cost too, b

[issue31141] Start should be a keyword argument of the built-in sum

2017-08-16 Thread Mark Bell
Mark Bell added the comment: I ran some timing tests of the patch I submitted to compare it to the current build of Python. Using timit on the current master branch I got: python.exe -m timeit "sum(())" 1.12 usec per loop python.exe -m timeit "sum((), 0)" 1.22 usec per loop

[issue31141] Start should be a keyword argument of the built-in sum

2017-08-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Adding this feature is so easy as moving '/' in Argument Clinic declaration one line up. I don't think it is worth to allow passing the first argument as a keyword argument. Check what performance effect of this change on simple calls sum(()), sum((), 0).

[issue31141] Start should be a keyword argument of the built-in sum

2017-08-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Lisa, would you like to take this one? -- assignee: -> lisroach nosy: +lisroach, rhettinger ___ Python tracker ___ _

[issue31141] Start should be a keyword argument of the built-in sum

2017-08-08 Thread Steven D'Aprano
Steven D'Aprano added the comment: This seems like a reasonable enhancement to `sum` to me. Since 2.7 is in feature freeze, this can only apply to 3.7. -- nosy: +steven.daprano type: behavior -> enhancement versions: -Python 2.7 ___ Python tracker

[issue31141] Start should be a keyword argument of the built-in sum

2017-08-08 Thread Mark Bell
Changes by Mark Bell : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue31141] Start should be a keyword argument of the built-in sum

2017-08-08 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3055 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue31141] Start should be a keyword argument of the built-in sum

2017-08-08 Thread Mark Bell
New submission from Mark Bell: The built-in function sum takes an optional argument "start" to specify what value to start adding from (defaults to 0). This argument should be a keyword argument in order to match the other built-in functions such as: enumerate(range(10), start=5) This pat