[Python-Dev] Re: anonymous blocks

Guido van Rossum gvanrossum at gmail.com
Thu Apr 28 01:17:32 CEST 2005


> OK - so what is the point of the sentence::
> 
>     The generator should re-raise this exception; it should not yield
>     another value.
> 
> when discussing StopIteration?

It forbids returning a value, since that would mean the generator
could "refuse" a break or return statement, which is a little bit too
weird (returning a value instead would turn these into continue
statements).

I'll change this to clarify that I don't care about the identity of
the StopException instance.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list