Has Next in Python Iterators

Paul Rudin paul.nospam at rudin.co.uk
Thu Oct 21 15:35:06 CEST 2010

Kelson Zawack <zawackkfb at gis.a-star.edu.sg> writes:

> Since an iterator having an end is not actually an exceptional case...

There's no requirement on iterators to be finite, so in a sense it is.

In general it may be impractical to know whether an iterator has reached
the end without calling next().

More information about the Python-list mailing list