Add show_positions
keyword argument to dis.dis
and related functions
#123165
Labels
show_positions
keyword argument to dis.dis
and related functions
#123165
Uh oh!
There was an error while loading. Please reload this page.
Feature or enhancement
Proposal:
dis.dis
is a useful debugging tool when trying to debug minor bytecode compiler errors.However it lacks one important feature, the ability to see the exact positions attached to instructions. It can only show line numbers.
We should add a
show_positions
keyword argument to show positions.For example, the function:
disassembles to:
with
show_positions
it would disassemble to something like:Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
dis
functions render positions on demand #123168dis.dis(func, show_positions=True)
#123220dis.disassemble
#123808The text was updated successfully, but these errors were encountered: