Message353310
> 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 :) |
|
Date |
User |
Action |
Args |
2019-09-26 14:30:42 | Thomas Haller | set | recipients:
+ Thomas Haller, serhiy.storchaka |
2019-09-26 14:30:42 | Thomas Haller | set | messageid: <1569508242.21.0.23881979878.issue38283@roundup.psfhosted.org> |
2019-09-26 14:30:42 | Thomas Haller | link | issue38283 messages |
2019-09-26 14:30:42 | Thomas Haller | create | |
|