◐ Shell
clean mode source ↗

Message 392066 - Python tracker

Please don't lose the big picture here.
Previously, the reported line number was *somewhere close* to the currently executing code. That's typically all I need from a traceback: the fix for a bug often needs to go a few lines above/below where it's reported.

If, in an effort to make line numbers *exact*, we determine that there's no good line number to report and use -1 or None, we're introducing a regression.


> We could give it the line number of the `with` keyword, but that might break coverage and profiling tools.

That sounds like a reasonable idea, despite the drawback. As we can see from the report, *any* change will probably break *some* tools.