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 gvanrossum
Recipients NeilGirdhar, bar.harel, brett.cannon, gvanrossum, levkivskyi, rhettinger, srkunze
Date 2016-08-23.16:28:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471969713.74.0.812934836511.issue27598@psf.upfronthosting.co.za>
In-reply-to
Content
ReIterable and Collection are different concepts.
- ReIterable just implements __iter__ but promises certain semantics.
- Collection implements __iter__, __contains__ and __len__.

If we had ReIterable I would probably decree that Collection inherits from it (practicality beats purity).

But I don't think ReIterable by itself would do much good; apart from a few "show-off" hacks, any reasonable ReIterable would also be able to implement __contains__ and __len__ easily.

And I would certainly call range() a Collection.
History
Date User Action Args
2016-08-23 16:28:33gvanrossumsetrecipients: + gvanrossum, brett.cannon, rhettinger, NeilGirdhar, levkivskyi, srkunze, bar.harel
2016-08-23 16:28:33gvanrossumsetmessageid: <1471969713.74.0.812934836511.issue27598@psf.upfronthosting.co.za>
2016-08-23 16:28:33gvanrossumlinkissue27598 messages
2016-08-23 16:28:33gvanrossumcreate