As stated in this question, we can turn a function into a coroutine using the asyncio.coroutine
decorator to turn a function into a coroutine like so:
def hello():
print('Hello World!')
async_hello = asyncio.coroutine(hello)
However this function is deprecated as of python 3.8 (replaced by async def ...
). So how can we do this in 3.8+ without async def ...
?