Message284978
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:20 | JelleZijlstra | set | recipients:
+ JelleZijlstra |
2017-01-08 11:29:20 | JelleZijlstra | set | messageid: <1483874960.49.0.58571949289.issue29205@psf.upfronthosting.co.za> |
2017-01-08 11:29:20 | JelleZijlstra | link | issue29205 messages |
2017-01-08 11:29:20 | JelleZijlstra | create | |
|