gh-123165: make `dis` functions render positions on demand by picnixz · Pull Request #123168 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions Doc/library/dis.rst
16 changes: 16 additions & 0 deletions Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,22 @@ ast

(Contributed by Bénédikt Tran in :gh:`121141`.)

dis
---

* Added support for rendering full source location information of
:class:`instructions <dis.Instruction>`, rather than only the line number.
This feature is added to the following interfaces via the ``show_positions``
keyword argument:

- :class:`dis.Bytecode`,
- :func:`dis.dis`, :func:`dis.distb`, and
- :func:`dis.disassemble`.

This feature is also exposed via :option:`dis --show-positions`.

(Contributed by Bénédikt Tran in :gh:`123165`.)

fractions
---------

Expand Down
101 changes: 72 additions & 29 deletions Lib/dis.py
Loading