![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
7 Nov
2015
7 Nov
'15
5:06 p.m.
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 <report@bugs.python.org> <http://bugs.python.org/issue25580> _______________________________________