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 terry.reedy
Recipients Jim Fasarakis-Hilliard, docs@python, marco.buttu, rhettinger, terry.reedy
Date 2017-02-03.23:01:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486162869.9.0.855476595192.issue29414@psf.upfronthosting.co.za>
In-reply-to
Content
The preceding sentences are also off.  "In many ways the object returned by range() behaves as if it is a list, but in fact it isn’t. It is an object which returns the successive items of the desired sequence when you iterate over it, but it doesn’t really make the list, thus saving space."

A range object is more like a tuple than a list.  Ranges and tuples are immutable sequences and the only non-dunder methods of both are count and index.  Lists, on the other hand, are mutable and several other exposed methods.  The difference between range and tuple is that ranges generate items as requested while tuples can be added and multiplied.

"Ranges are similar to tuples in being sequences with count and index methods.  Both can be indexed, sliced, and iterated.  However, ranges cannot be added or multiplied.  They generate their items on request, thus saving space"

I am still thinking about the next two sentences, discussed above.  I do not like 'construct' to mean 'statement' (or callable).
History
Date User Action Args
2017-02-03 23:01:09terry.reedysetrecipients: + terry.reedy, rhettinger, docs@python, marco.buttu, Jim Fasarakis-Hilliard
2017-02-03 23:01:09terry.reedysetmessageid: <1486162869.9.0.855476595192.issue29414@psf.upfronthosting.co.za>
2017-02-03 23:01:09terry.reedylinkissue29414 messages
2017-02-03 23:01:09terry.reedycreate