[Python-Dev] Single- vs. Multi-pass iterability
Guido van Rossum
guido@python.org
Fri, 12 Jul 2002 12:12:58 -0400
> Would it be useful to add to the interator "interface" a method which
> would retrieve the original iterable object? I've no idea what that
> method should be called, but it seems like it would be trivial to add
> since most (all?) iterators have a pointer to their underlying object
> anyway, don't they?
No. The (important!) class of generator-iterators does not have an
underlying container object.
--Guido van Rossum (home page: http://www.python.org/~guido/)