2 ms·
You still can do that using @asyncio.coroutine decorator for example @asyncio.coroutine def hello(): return "foo" Although not for long, they
by takeda 6y ago
You still can do that using @asyncio.coroutine decorator
for example
@asyncio.coroutine
def hello():
return "foo"
Although not for long, they deprecated it in 3.8 and will be removed in 3.10. I wish they would leave it, since I was able to use them to write API that could be synchronous or not depending which constructor was invoked. I'm wondering if there are better ways to do it.
- deleted 6y ago[deleted]