[docs] [issue25580] async and await missing from token list
Stéphane Wirtel
report at bugs.python.org
Sat Nov 7 11:06:22 EST 2015
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 at bugs.python.org>
<http://bugs.python.org/issue25580>
_______________________________________
More information about the docs
mailing list