[issue43950] Include column offsets for bytecode instructions

Pablo Galindo Salgado report at bugs.python.org
Tue Apr 27 06:58:38 EDT 2021


New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:

If we could include column offsets from the AST nodes for every bytecode instructions we could leverage these to offer much better tracebacks and a lot more information to debuggers and similar tools. For instance, in an expression such as:

z['aaaaaa']['bbbbbb']['cccccc']['dddddd].sddfsdf.sdfsdf

where one of these elements is None, we could tell exactly what of these pieces is the actual None and we could do some cool highlighting on tracebacks.

Similarly, coverage tools and debuggers could also make this distinction and therefore could offer reports with more granularity.

The cost is not 0: it would be two integers per bytecode instruction, but I think it may be worth the effort.

----------
messages: 392054
nosy: Mark.Shannon, pablogsal
priority: normal
severity: normal
status: open
title: Include column offsets for bytecode instructions

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43950>
_______________________________________


More information about the Python-bugs-list mailing list