Suppose x is an instance of a class with the iterator method installed, e.g., a string, and suppose iter is the output of iterator x. Then a new Iterator object is returned whose next method returns the next output of next iter for which f next iter is true, unless next iter returns StopIteration, in which case this new iterator does the same.
|
|
|
|