[Python-Dev] PEP Idea: Syntactic sugar for StopIteration.

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Dec 9 00:44:04 CET 2007

Manuel Alejandro Cerón Estrada wrote:
> The real problem is that
> raising StopIteration is not orthogonal.

This is a non-problem as far as I can see. In a generator,
the way to stop the iteration is simply to return. In a
non-generator iterator, you're still going to have to
raise StopIteration. So I see no advantage at all to this


More information about the Python-Dev mailing list