This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Claudiu.Popa
Recipients Claudiu.Popa, benjamin.peterson, emile.anclin, ncoghlan
Date 2014-06-12.12:08:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402574932.9.0.727964380453.issue10445@psf.upfronthosting.co.za>
In-reply-to
Content
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
>>>
History
Date User Action Args
2014-06-12 12:08:52Claudiu.Popasetrecipients: + Claudiu.Popa, ncoghlan, benjamin.peterson, emile.anclin
2014-06-12 12:08:52Claudiu.Popasetmessageid: <1402574932.9.0.727964380453.issue10445@psf.upfronthosting.co.za>
2014-06-12 12:08:52Claudiu.Popalinkissue10445 messages
2014-06-12 12:08:52Claudiu.Popacreate