[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: Agreed. Fix committed & issue closed. -- status: open -> closed ___ Python tracker ___ ___ Python-b

[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 76e5fe8e21fd by Eli Bendersky in branch '2.7': Issue 12003: fixing error in xrange alternative sample http://hg.python.org/cpython/rev/76e5fe8e21fd -- nosy: +python-dev ___ Python tracker

[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Given that the note is already gone* as obsolete in 3.x, I think a minimal maintenance fix for correctness should be fine for 2.7. * It is replaced, in essence, by "Ranges containing absolute values larger than sys.maxsize are permitted but some features (suc

[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: Éric, I'm not sure that the note is necessary at all, but once it's there, it should value *correctness* over conciseness and readability. -- ___ Python tracker __

[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-22 Thread Éric Araujo
Éric Araujo added the comment: The docs should value readability over conciseness IMHO; the examples here with seven operations in a row are a bit scary. -- ___ Python tracker

[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-21 Thread Eli Bendersky
Eli Bendersky added the comment: I think that if this note should stay in the docs at all, it should be as concise as possible, so I like Terry's -1+2*(step<0) option. I also tested it on a few more inputs and it works fine. If there are no objections, I can commit it to python 2.7 docs in a

[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I verified bug on winxp with 2.7 xrangef [5, 4, 3, 2, 1, 0] py26 [] py27 [5, 4, 3, 2, 1, 0, -1, -2] v1 [5, 4, 3, 2, 1, 0] v2 [5, 4, 3, 2, 1, 0] v3 [5, 4, 3, 2, 1, 0] --- xrangef [5, 3, 1, -1, -3] py26 [] py27 [5, 3, 1, -1, -3, -5] v1 [5, 3, 1

[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-06 Thread alejandro david weil
alejandro david weil added the comment: Yes it is. I copied both versions but forgot to specify the second is in 2.7. This is read in the current (2.7) documentation: # from: http://docs.python.org/library/functions.html?highlight=xrange#xrange islice(count(start, step), (stop-start+step-1)//st

[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-06 Thread Éric Araujo
Éric Araujo added the comment: Hi. Python 2.6 is in security mode, its documentation is not updated nor released anymore. Is this bug present in the documentation of 2.7 or 3.x versions? -- nosy: +eric.araujo versions: -Python 2.6 ___ Python tra

[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-05 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-04 Thread alejandro david weil
New submission from alejandro david weil : Python's documentation includes 2 source codes for alternate xrange implementations, which, at least in my tests, give unexpected results. # from file:///usr/share/doc/python2.6-doc/html/library/functions.html#xrange takewhile(lambda x:xhttp://docs.pyt