[Python-Dev] Re: anonymous blocks

Guido van Rossum gvanrossum at gmail.com
Wed Apr 27 18:55:14 CEST 2005

> I would think that the relevant psuedo-code should look more like:
>             except StopIteration:
>                 if ret:
>                     return exc
>                 if exc is not None:
>                     raise exc   # XXX See below
>                 break

Thanks! This was a bug in the PEP due to a last-minute change in how I
wanted to handle return; I've fixed it as you show (also renaming
'exc' to 'var' since it doesn't always hold an exception).

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

More information about the Python-Dev mailing list