Issue 24623: Parser: broken line numbers for triple-quoted strings (original) (raw)

IMO the string should start at lineno=1, col_offset=0.

$ ./python Python 3.6.0a0 (default:02b81a82a57d, Jul 12 2015, 20:33:44) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information.

import ast a = ast.parse('''"""xxx ... yyy ... zzz"""''') ast.dump(a, include_attributes=True) "Module(body=[Expr(value=Str(s='xxx\nyyy\nzzz', lineno=3, col_offset=-1), lineno=3, col_offset=-1)])"