Message273478
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. |
|
Date |
User |
Action |
Args |
2016-08-23 16:28:33 | gvanrossum | set | recipients:
+ gvanrossum, brett.cannon, rhettinger, NeilGirdhar, levkivskyi, srkunze, bar.harel |
2016-08-23 16:28:33 | gvanrossum | set | messageid: <1471969713.74.0.812934836511.issue27598@psf.upfronthosting.co.za> |
2016-08-23 16:28:33 | gvanrossum | link | issue27598 messages |
2016-08-23 16:28:33 | gvanrossum | create | |
|