Stefan Krah added the comment: This is a very nice solution!
I'm just curious if the 'ctx' is still needed: It looks like the outermost "async def" dominates all further nested scopes w.r.t the tokenizer mode, no matter whether they're "def" or "async def" scopes. IOW, a single indent_level variable that follows all INDENTs/DEDENTs once the outermost "async def" scope is entered might be sufficient. [This is in no way urgent, please do not feel obliged to respond during your holiday.] ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24619> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com