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 <rep...@bugs.python.org>
<http://bugs.python.org/issue21295>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to