classification
Title: ast.parse produces wrong lineno and col_offset for triple-quoted strings
Type: behavior Stage:
Components: Interpreter Core Versions: Python 3.1, Python 3.2, Python 3.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder: col_offset is -1 and lineno is wrong for multiline string expressions
View: 16806
Assigned To: Nosy List: Aivar.Annamaa
Priority: normal Keywords:

Created on 2013-07-05 20:24 by Aivar.Annamaa, last changed 2013-07-06 16:51 by brett.cannon. This issue is now closed.

Files
File name Uploaded Description Edit
col_offset_bug.py Aivar.Annamaa, 2013-07-05 20:24 reproduces the bug
Messages (3)
msg192355 - (view) Author: Aivar Annamaa (Aivar.Annamaa) * Date: 2013-07-05 20:24
AST nodes for triple-quoted strings have -1 in col_offset field, as presented in the attached file.
msg192359 - (view) Author: Aivar Annamaa (Aivar.Annamaa) * Date: 2013-07-05 20:55
Didn't notice before: the lineno attribute is also wrong
msg192395 - (view) Author: Aivar Annamaa (Aivar.Annamaa) * Date: 2013-07-06 09:44
Seems this issue is a duplicate of http://bugs.python.org/issue16806
History
Date User Action Args
2013-07-06 16:51:43brett.cannonsetsuperseder: col_offset is -1 and lineno is wrong for multiline string expressions
2013-07-06 09:44:32Aivar.Annamaasetstatus: open -> closed
resolution: duplicate
messages: + msg192395
2013-07-05 21:09:13Aivar.Annamaasettitle: ast.parse produces -1 as col_offset for triple-quoted strings -> ast.parse produces wrong lineno and col_offset for triple-quoted strings
2013-07-05 20:55:42Aivar.Annamaasetmessages: + msg192359
2013-07-05 20:24:05Aivar.Annamaacreate