[issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s
Aivar Annamaa
report at bugs.python.org
Fri Jul 5 05:38:36 EDT 2019
Aivar Annamaa <aivar.annamaa at gmail.com> added the comment:
> in my opinion the col_offsets of the two nodes should be 1 and 3, respectively (the positions of the operators)
This would not match the documentation:
> one can get the source segment of a one-line expression node using source_line[node.col_offset : node.end_col_offset]
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18374>
_______________________________________
More information about the Python-bugs-list
mailing list