[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse
Radek Novacek
report at bugs.python.org
Tue Oct 6 06:37:16 EDT 2015
Radek Novacek added the comment:
Aivar, I have to admit that my knowledge of this is limited, but as I understand it, the attribute is "bar" in the "foo.bar" expression.
I can get beginning of the assignment by
>>> ast.parse('foo.bar').body[0].value.value.col_offset
0
But how can I get position of the 'bar'? My guess is this:
>>> ast.parse('foo.bar').body[0].value.col_offset
but it still returns 0.
Why this two col_offsets returns the same value? How can I get the position of 'bar' in 'foo.bar'?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21295>
_______________________________________
More information about the Python-bugs-list
mailing list