[issue23787] sum() function docstring lists arguments incorrectly

2017-06-06 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Raymond's patch has been applied to 2.7 branch. Thanks :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue23787] sum() function docstring lists arguments incorrectly

2017-06-06 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 536209ef92f16ea8823209a3c4b8763c0ec5d4bc by Mariatta in branch '2.7': bpo-23787: Change sum() docstring from sequence to iterable (GH-1859) https://github.com/python/cpython/commit/536209ef92f16ea8823209a3c4b8763c0ec5d4bc --

[issue23787] sum() function docstring lists arguments incorrectly

2017-05-29 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review ___ Python tracker ___ ___

[issue23787] sum() function docstring lists arguments incorrectly

2017-05-29 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1942 ___ Python tracker ___ ___

[issue23787] sum() function docstring lists arguments incorrectly

2017-04-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: I believe this is just a 2.7 issue. -- versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue23787] sum() function docstring lists arguments incorrectly

2017-04-16 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- assignee: docs@python -> Mariatta nosy: +Mariatta versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue23787] sum() function docstring lists arguments incorrectly

2017-04-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Serhiy] > Raymond, could you open a pull request? Perhaps you could do it for me. I still haven't had time to wrestle with the github switchover, so I'm effectively crippled for a while. [Valentine] > Seems like mentioning string was really a bad idea

[issue23787] sum() function docstring lists arguments incorrectly

2017-04-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Raymond, could you open a pull request? -- keywords: +easy nosy: +serhiy.storchaka priority: normal -> low status: open -> pending ___ Python tracker

[issue23787] sum() function docstring lists arguments incorrectly

2015-03-29 Thread Valentine Sinitsyn
Valentine Sinitsyn added the comment: Seems like mentioning string was really a bad idea. They were only used as (poor) example, forget them if they are confusing in any way. In my understanding, any sequence in Python is iterable, bit not all iterables are sequences (correct me if I'm

[issue23787] sum() function docstring lists arguments incorrectly

2015-03-28 Thread Wolfgang Maier
Wolfgang Maier added the comment: This implies sum() should accept str, unicode, list, tuple, bytearray, buffer, and xrange. and in fact it *does* accept all these as input. It just refuses to add the elements of the sequence if these elements are of certain types. Of course, the elements of

[issue23787] sum() function docstring lists arguments incorrectly

2015-03-27 Thread Valentine Sinitsyn
New submission from Valentine Sinitsyn: sum() function doctstring describes expected arguments as follows (Python 2.7.6): sum(...) sum(sequence[, start]) - value ... This implies sum() should accept str, unicode, list, tuple, bytearray, buffer, and xrange. However, you clearly can't use

[issue23787] sum() function docstring lists arguments incorrectly

2015-03-27 Thread R. David Murray
R. David Murray added the comment: In python3 the docstring does say iterable. It wouldn't be a bad thing to change it in 2.7, but it is not much of a priority. iterable vs sequence makes no difference to the str question: a string is an iterable. The docstring explicitly says strings are

[issue23787] sum() function docstring lists arguments incorrectly

2015-03-27 Thread Valentine Sinitsyn
Valentine Sinitsyn added the comment: Yes, strings aren't an issue. I only used them as an example. I came across this issue during code review, discussing if it is okay to pass generator expression to sum() (like sum(x*2 for x in xrange(5)) or is it better to convert it to the list first

[issue23787] sum() function docstring lists arguments incorrectly

2015-03-27 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file38716/sum_doc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23787