Marc Schlaich added the comment:

Yes, all yield-based coroutines are generators. I know that there is a backward 
compatible upgrade path, but this might have a huge impact on existing code.

Interestingly, I didn't know before researching this PEP that you can actually 
use `return` without arguments in generators before Python 3.3 (even in 2.3) 
and I have worked a lot with coroutines/generators.

So I'm not even against this proposal and using `return` instead of `raise 
StopIteration` seems the right way to exit a generator/coroutine, but there 
could be lots of affected users...

----------

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

Reply via email to