Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

You say:

> The PEP reads as if returning a value via StopIteration was meant to signal 
> that the generator was finished and that StopIteration.value was the final 
> value.

To me, the PEP is clear that `return expr` is equivalent to `raise 
StopIteration(expr)` which is *not* used as an iteration value. Can you point 
to the passage in the PEP that suggests something different to you?

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35756>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to