Thanks for your reply, Guido. On Fri, Feb 19, 2021 at 12:07 AM Guido van Rossum <gu...@python.org> wrote: > Reading the doc section you link to, it's pretty clear that > `@asyncio.coroutine` will be removed.
The *Note* right at the top of [1] says "Support for generator-based coroutines is deprecated and is scheduled for removal in Python 3.10." [1] https://docs.python.org/3/library/asyncio-task.html#generator-based-coroutines But PEP 492 [2] says: "Since, internally, coroutines are a special kind of generators, every await is suspended by a yield somewhere down the chain of await calls" [2] https://www.python.org/dev/peps/pep-0492/#await-expression If that part of PEP 492 is no longer accurate, then I have a couple of questions: 1) What Python construct is to be used at the end of a chain of await calls, if not of a generator-based coroutine decorated with `@types.coroutine` and using a `yield` expression in its body? 2) Given that the sole purpose of `@types.coroutine` is to decorate generator-based coroutines to become awaitable, will that decorator also be removed, along with "support for generator-based coroutines"? Best, Luciano -- Luciano Ramalho | Author of Fluent Python (O'Reilly, 2015) | http://shop.oreilly.com/product/0636920032519.do | Technical Principal at ThoughtWorks | Twitter: @ramalhoorg _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/PQL4L36NHFBJ26N7REKSUMSXDKEF453M/ Code of Conduct: http://python.org/psf/codeofconduct/