1 Oct
2015
1 Oct
'15
10:02 p.m.
On Fri, Oct 2, 2015 at 1:58 PM, Steven D'Aprano
If you want a more practical example, any algorithm which needs to iterate over an interable two or more times needs to specify "iterable which is not an iterator".
For that particular case, I'd reiterate what others have suggested, and use the term "reiterable" for something you can iterate over more than once and get the same results. Sequences are normally reiterable. Any object whose __iter__ is a generator function with stable results will be reiterable. An iterator is not; nor is an open file object, or any other object where iteration consumes an external resource. This seems reasonable. ChrisA