On Fri, Feb 19, 2021 at 1:59 AM Guido van Rossum
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?
At the end of the chain you can call the __await__() method which gives an iterator, and then you call next() or send() on that iterator. Each next()/send() call then represents an await step, and send() in general is used to provide an awaited result. Eventually this will raise StopIteration with a value indicating the ultimate result (the return value of the top-level async def).
All right, that made sense to me. Thank you so much, Guido. Thanks for the clarification about `@types.coroutine` as well. Take care, Luciano -- Luciano Ramalho | Author of Fluent Python (O'Reilly, 2015) | http://shop.oreilly.com/product/0636920032519.do | Technical Principal at ThoughtWorks | Twitter: @ramalhoorg