This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nedbat
Recipients docs@python, nedbat
Date 2014-11-02.21:07:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414962423.59.0.0293441090984.issue22785@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-11-02 21:07:03nedbatsetrecipients: + nedbat, docs@python
2014-11-02 21:07:03nedbatsetmessageid: <1414962423.59.0.0293441090984.issue22785@psf.upfronthosting.co.za>
2014-11-02 21:07:03nedbatlinkissue22785 messages
2014-11-02 21:07:03nedbatcreate