Claudiu.Popa added the comment: This doesn't seem to be the case for Python 3.4. Also, _ast.arguments didn't have "lineno" and "col_offset" attributes neither in Python 2. But the _arg.arg nodes have those attributes, as seen in this example.
>>> from ast import parse >>> parse(""" ... def test(a): pass ... """) <_ast.Module object at 0x02E43330> >>> f=_ >>> f.body[0].args <_ast.arguments object at 0x02E43390> >>> f.body[0].args.lineno Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'arguments' object has no attribute 'lineno' >>> f.body[0].args.args [<_ast.arg object at 0x02E43270>] >>> f.body[0].args.args[0].lineno 2 >>> ---------- nosy: +Claudiu.Popa type: resource usage -> behavior _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10445> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com