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 Thomas Haller
Recipients Thomas Haller, serhiy.storchaka
Date 2019-09-26.14:30:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569508242.21.0.23881979878.issue38283@roundup.psfhosted.org>
In-reply-to
Content
> We could keep f_lineno unchanged, despite the fact that its value can be wrong

It was not completely wrong. It was seemingly good enough for the past 20+ years.


The change in behaviour is one thing. It's also inconvenient that, even when being aware of the change in behaviour, there is no workaround to get the same number across python versions. Something like:

  if hasattr(frame, 'f_lineno_legacy'):
      return frame.f_lineno_legacy
  else
      return frame.f_lineno

Are you aware of such a workaround?


> But there are some drawbacks in such approach.

Definitely. While I don't agree with the decision and priorities for how the final approach was chosen, thank you for explaining them :)
History
Date User Action Args
2019-09-26 14:30:42Thomas Hallersetrecipients: + Thomas Haller, serhiy.storchaka
2019-09-26 14:30:42Thomas Hallersetmessageid: <1569508242.21.0.23881979878.issue38283@roundup.psfhosted.org>
2019-09-26 14:30:42Thomas Hallerlinkissue38283 messages
2019-09-26 14:30:42Thomas Hallercreate