New submission from Claudiu.Popa: Here's a strange bug. I don't know if this is legitimate or not, but it seems like there is some sort of overflow.
Given the following code: data = """ def function(*, foot): print(foot) """ from ast import parse import tracemalloc tracemalloc.start() node = parse(data) tracemalloc.stop() arg = node.body[0].args.kwonlyargs[0] print(arg.lineno, arg.col_offset) it yields on a freshly build the following, which is obviously wrong. It should have printed `1 1`. <_ast.arg object at 0x80103bcf8> 1681660160 -2124152704 Also, there is no need to call tracemalloc.start, it has the same behaviour just by importing it. ---------- components: Library (Lib) messages: 211165 nosy: Claudiu.Popa priority: normal severity: normal status: open title: tracemalloc changes col_offset attribute for _ast.arg objects type: behavior versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20619> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com