Python3 中还有协程吗?

Are there still coroutines in Python 3?

在 Python 2 here http://www.dabeaz.com/coroutines/. However, searching Python 3 official documentation 中对关键字 "coroutine" 和“(yield)” 有协程的详细解释,我只找到 asyncio.coroutines 特定于asyncio 模块,他们使用 "yield from" 语法。

是的。 Beazley 写的所有内容继续适用于 Python 3.

注意。在 2.7 yield statement 文档中,'coroutine' 仅出现在 See also PEP 0342 标题中。对于 3.x,另见部分以及 link 已移至 previous chapter. The 3.x yield statement 文档中的 yield 表达式 部分 (yield <expr>) 而不仅仅是 (yield).