4 ms·
> and i wonder why they would It's easy, actually: import asyncio @asyncio.async # SyntaxError in 3.7 def my_coroutine(...): ... And since async
by mahoro 8y ago
> and i wonder why they would
It's easy, actually:
import asyncio
@asyncio.async # SyntaxError in 3.7
def my_coroutine(...): ...
And since asyncio is one of the strongest reason to migrate to python 3.x, I bet far less than 99.99% of code written for 3.4/3.5 can be run on 3.7 with no changes.
Luckly, 99% of changes were trivial. Other 1% is a nightmare.
- blattimwind 8y agoUsing async and await as non-keywords was deprecated since 3.5, while asyncio.async was deprecated since 3.4.