Stéphane Wirtel added the comment:
With python 3.5, async is a token with the ASYNC type.
>>> tokens = tokenize.generate_tokens(io.StringIO('async def foo').readline)
>>> pprint.pprint(list(tokens))
[TokenInfo(type=55 (ASYNC), string='async', start=(1, 0), end=(1, 5),
line='async def foo'),
TokenInfo(type=1 (NAME), string='def', start=(1, 6), end=(1, 9), line='async
def foo'),
TokenInfo(type=1 (NAME), string='foo', start=(1, 10), end=(1, 13), line='async
def foo'),
TokenInfo(type=0 (ENDMARKER), string='', start=(2, 0), end=(2, 0), line='')]
----------
nosy: +matrixise
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25580>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com