I like the proposal, but it’s a breaking change and might affect the existing tools that depend on it.
The reason I like it is because it displays the most interesting information at the start of the line - where most people pay attention to first. Also, it would be nice to have a consistent file:lineno format in pdb(breakpoint uses it).
-> a = 1
> f (/home/gaogaotiantian/programs/cpython/scrabble.py:3)
-> a = 1
Anyone has opinions on this change or something that I did not think of that could negatively affect the users?
That’s another possibility. My concern is that if the stack format is too similar to the exception, the user might think they got an error when they print the stack - it’s just their impression when they see that format.
Yes, we need to change tests for pdb, and it’s possible that other libraries rely on that format, and that’s why I’m asking for opinions. The test modification for pdb is easy, I don’t know how many tools out there are relying on this specific format. pdb is a relatively independent tool and I believe most of the debuggers that are built on pdb are implementing the stack format themselves.
It is definitely a trade off. I’m in favor of changing it but I’m not pushing it. I’m open to all ideas and suggestions.