➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 schlamar
收信人 Rosuav, gvanrossum, python-dev, schlamar
日期 2014-11-21.17:35:57
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1416591357.8.0.692001153499.issue22906@psf.upfronthosting.co.za>
In-reply-to
内容
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...
历史
日期 用户 动作 参数
2014-11-21 17:35:57schlamar修改recipients: + schlamar, gvanrossum, python-dev, Rosuav
2014-11-21 17:35:57schlamar修改messageid: <1416591357.8.0.692001153499.issue22906@psf.upfronthosting.co.za>
2014-11-21 17:35:57schlamar链接issue22906 messages
2014-11-21 17:35:57schlamar创建