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, Mark.Shannon, eric.smith, levkivskyi, martin.panter, r.david.murray, yan12125
Date 2017-03-12.14:03:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1489327418.79.0.974196410237.issue29051@psf.upfronthosting.co.za>
In-reply-to
Content
I'm adding another example here, where the lineno reporting is wrong:

  from ast import parse 
  n = parse('''

  def test():
     return f"{a}"
  ''')
  f = n.body[0].body[0].value.values[0]
  n = f.value
  print("name lineno", n.lineno)

In this example, the line number of the f-string inner variable is 1, while it should be 3.
As Mark Shannon said, this bug is affecting tools such as pyflakes and pylint.
History
Date User Action Args
2017-03-12 14:03:38Claudiu.Popasetrecipients: + Claudiu.Popa, eric.smith, r.david.murray, Mark.Shannon, martin.panter, levkivskyi, yan12125
2017-03-12 14:03:38Claudiu.Popasetmessageid: <1489327418.79.0.974196410237.issue29051@psf.upfronthosting.co.za>
2017-03-12 14:03:38Claudiu.Popalinkissue29051 messages
2017-03-12 14:03:38Claudiu.Popacreate