[issue22785] range docstring is less useful than in python 2

2015-04-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aa6b73823685 by Benjamin Peterson in branch '3.4':
improved range docstring (closes #22785)
https://hg.python.org/cpython/rev/aa6b73823685

New changeset c031fa8e6884 by Benjamin Peterson in branch 'default':
merge 3.4 (#22785)
https://hg.python.org/cpython/rev/c031fa8e6884

--
nosy: +python-dev
resolution:  - fixed
stage: needs patch - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22785
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22785] range docstring is less useful than in python 2

2015-04-21 Thread Ned Batchelder

Ned Batchelder added the comment:

(By the time I got to the source, the word virtual had been removed...)

Attached is a patch to make the help read:

 |  range(stop) - range object
 |  range(start, stop[, step]) - range object
 |
 |  Return an object that produces a sequence of integers from start (inclusive)
 |  to stop (exclusive) by step.  range(i, j) produces i, i+1, i+2, ..., j-1.
 |  start defaults to 0, and stop is omitted!  range(4) produces 0, 1, 2, 3.
 |  These are exactly the valid indices for a list of 4 elements.
 |  When step is given, it specifies the increment (or decrement).

--
keywords: +patch
Added file: http://bugs.python.org/file39163/22785.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22785
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22785] range docstring is less useful than in python 2

2015-03-02 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +benjamin.peterson
type:  - enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22785
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22785] range docstring is less useful than in python 2

2014-11-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

 Note that Python 3 seems to imply that the end-point is included

The Python 2 wording is better in this regard.

Also, it would be nice clarify what is meant by virtual sequence.  I know 
what that means only because I already know what range() does.  For someone who 
doesn't already know what it means, that phrase probably doesn't add any value.

--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22785
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22785] range docstring is less useful than in python 2

2014-11-04 Thread Devin Jeanpierre

Changes by Devin Jeanpierre jeanpierr...@gmail.com:


--
nosy: +Devin Jeanpierre

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22785
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22785] range docstring is less useful than in python 2

2014-11-04 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage:  - needs patch
versions: +Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22785
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22785] range docstring is less useful than in python 2

2014-11-02 Thread Ned Batchelder

New submission from Ned Batchelder:

The Python 3.4 docstring for range is:
{{{
 |  range(stop) - range object
 |  range(start, stop[, step]) - range object
 |
 |  Return a virtual sequence of numbers from start to stop by step.
}}}

In Python 2.7, it said:
{{{
range(stop) - list of integers
range(start, stop[, step]) - list of integers

Return a list containing an arithmetic progression of integers.
range(i, j) returns [i, i+1, i+2, ..., j-1]; start (!) defaults to 0.
When step is given, it specifies the increment (or decrement).
For example, range(4) returns [0, 1, 2, 3].  The end point is omitted!
These are exactly the valid indices for a list of 4 elements.
}}}

Note that Python 3 seems to imply that the end-point is included, while Python 
2 made clear that it was not.  Arithmetic progression is a bit involved, but 
it would be good to mention that the end-point is omitted in the Python 3 
docstring.

--
assignee: docs@python
components: Documentation
messages: 230525
nosy: docs@python, nedbat
priority: normal
severity: normal
status: open
title: range docstring is less useful than in python 2
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22785
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com