Jim Fulton <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:
>> No, the return sets a flag and raises StopIteration which should make
>> the iterator also raise StopIteration at which point the real return
>> happens.
>
> Only if exc is not None
>
> The only return in the pseudocode is inside "if exc is not None".
> Is there another return that's not shown? ;)
>
Ah yes, I see now what you mean.
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
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com