[New-bugs-announce] [issue13746] ast.Tuple's have an inconsistent "col_offset" value

Igor Bronshteyn report at bugs.python.org
Mon Jan 9 17:33:56 CET 2012


New submission from Igor Bronshteyn <igor.bronstein at gmail.com>:

Consider the following snippet (the file is attached):

==== code starts ====
a = [1, 3.14, 'abc', u'XYZ']
b = (1, 3.14, 'abc', u'XYZ')
c = {1 : 3.14, 'abc' : u'XYZ'}
===== code ends =====

The list has correct position: (1,4), the dict has correct position too: (3,4). But the position of tuple node (ast.Tuple) has wrong or inconsistent "col_offset" = 5: (2,5).

----------
files: sample01.py
messages: 150950
nosy: bronikkk
priority: normal
severity: normal
status: open
title: ast.Tuple's have an inconsistent "col_offset" value
type: behavior
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file24187/sample01.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13746>
_______________________________________


More information about the New-bugs-announce mailing list