Message316665
The `col_offset` of the ast.Tuple node is set to the column offset of the first element, shown in code:
>>> a = "{1,2,3}"
>>> b = ast.parse(a).body[0]
>>> b.value.col_offset
0
>>> a = "[1,2,3]"
>>> b = ast.parse(a).body[0]
>>> b.value.col_offset
0
>>> a = "(1,2,3)"
>>> ast.parse(a).body[0].value.col_offset
1
>>> a = "()"
>>> ast.parse(a).body[0].value.col_offset
0
It's correct for dict, set, list, even empty tuple, Though this is not a serious bug, for other python implementations that uses the tests as language spec, this is annoying. |
|
Date |
User |
Action |
Args |
2018-05-15 15:16:22 | isaiah | set | recipients:
+ isaiah |
2018-05-15 15:16:22 | isaiah | set | messageid: <1526397382.35.0.682650639539.issue33520@psf.upfronthosting.co.za> |
2018-05-15 15:16:22 | isaiah | link | issue33520 messages |
2018-05-15 15:16:22 | isaiah | create | |
|