This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients gvanrossum, martin.panter, ncoghlan, skrah, vstinner, yselivanov
Date 2015-07-21.14:30:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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 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 [..]

Date User Action Args
2015-07-21 14:30:25yselivanovsetrecipients: + yselivanov, gvanrossum, ncoghlan, vstinner, skrah, martin.panter
2015-07-21 14:30:25yselivanovsetmessageid: <>
2015-07-21 14:30:25yselivanovlinkissue24619 messages
2015-07-21 14:30:25yselivanovcreate