Author Jelle Zijlstra
Recipients Jelle Zijlstra
Date 2017-01-08.11:29:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The col_offset attribute for ast.AsyncFunctionDef objects points to the "def" keyword, not to the "async" keyword that actually starts the node.

Test case:

In [18]: code = 'async def f(): pass'

In [19]: tree = ast.parse(code)

In [20]: tree.body[0]
Out[20]: <_ast.AsyncFunctionDef at 0x7f5cb6a58f60>

In [21]: tree.body[0].col_offset
Out[21]: 6
Date User Action Args
2017-01-08 11:29:20Jelle Zijlstrasetrecipients: + Jelle Zijlstra
2017-01-08 11:29:20Jelle Zijlstrasetmessageid: <>
2017-01-08 11:29:20Jelle Zijlstralinkissue29205 messages
2017-01-08 11:29:20Jelle Zijlstracreate