py_better_exchook
py_better_exchook copied to clipboard
Show variables in f-strings
It would be helpful to also show the values for variables inside of f-strings.
For example, I just got this error here:
File "...gather.py", line 29, in <module>
line: out_file.write(f"{in_lines[index]}\n")
locals:
out_file = <local> <_io.TextIOWrapper name='...out.gz' encoding='UTF-8'>
out_file.write = <local> <built-in method write of _io.TextIOWrapper object at 0x7faf53b75050>
And I would love betterexchook to also print in_lines, index, etc.
Yep, I know, I also would like to have that. :)
PRs are welcome.
The problem is, the Python code parsing currently is very simple, and this might increase the complexity quite a bit. Or maybe it's possible to implement this in a away that does not add much complexity? I haven't really thought about it yet.