Why do we need the asyncio.coroutine decorator? What functionality does it provide?
For example:
# import asyncio
# @asyncio.coroutine
def gen():
value = yield("Started")
print(value)
a = gen()
a.send(None)
a.send("Done")
Now if I uncomment the first two lines and use the asyncio.coroutine decorator, I still get the same output.
I mean this is already a coroutine - a function that can be paused and passed in with an argument. Why do I need to decorate it with another coroutine i.e asyncio.coroutine?