Yury Selivanov added the comment:
An updated patch is attached. I had to implement a little bit more
sophisticated tracking of one-line functions to fix parsing of things like
def foo():
async def f(): pass
async def f(): pass
async = 1
I hope that test_coroutine.py now covers all possible legal and illegal
async/await syntax.
> Haven't reviewed the patch, but this approach sounds great (in fact I had
> assumed you were doing this already, and I was a bit surprised by some of
> the problems you encountered :-).
Yes, I'm a bit surprised myself ;) I guess one of the reasons why I tried to
do more in tokenizer is that at the time of me hacking the tokenizer, compile.c
wasn't quite ready (specifically, catching async for/async with/await outside
of async functions).
> Good news :) I guess this means we can also remove the sentence I added at
> [..]
Right!
----------
Added file: http://bugs.python.org/file39965/issue24619.2.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24619>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com