Meador Inge <mead...@gmail.com> added the comment:

I can reproduce this in tip as well:

>>> ast.dump(ast.parse('a = (1,2)'), include_attributes=True)
"Module(body=[Assign(targets=[Name(id='a', ctx=Store(), lineno=1, 
col_offset=0)], value=Tuple(elts=[Num(n=1, lineno=1, col_offset=5), Num(n=2, 
lineno=1, col_offset=7)], ctx=Load(), lineno=1, col_offset=5), lineno=1, 
col_offset=0)])"
>>> ast.dump(ast.parse('a = (1 + 2)'), include_attributes=True)
"Module(body=[Assign(targets=[Name(id='a', ctx=Store(), lineno=1, 
col_offset=0)], value=BinOp(left=Num(n=1, lineno=1, col_offset=5), op=Add(), 
right=Num(n=2, lineno=1, col_offset=9), lineno=1, col_offset=5), lineno=1, 
col_offset=0)])"

The actual column number is lost when calling into 'ast_for_testlist'
from the 'LPAR' case of 'ast_for_atom'.

----------
nosy: +benjamin.peterson, meador.inge
stage:  -> needs patch
versions: +Python 3.2, Python 3.3 -Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13746>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to