What makes an iterator an iterator?
Alex Martelli
aleax at mac.com
Thu Apr 19 23:00:32 EDT 2007
Steven D'Aprano <steve at REMOVE.THIS.cybersource.com.au> wrote:
> > Calling a generator, such as this next method, returns an iterator
> > object; calling it repeatedly returns many such iterator objects, and
> > never raises StopIteration, thus obviously producing an unending loop.
>
> Thank you for that answer Alex, even though I didn't ask the question I
> was wondering the same thing myself.
You're welcome -- refreshing to see somebody who can actually understand
and accept the answer, rather than going on unrelated tangents when one
tries to help them:-).
Alex
More information about the Python-list
mailing list