MCPcopy Index your code
hub / github.com/RustPython/RustPython / distb

Function distb

Lib/dis.py:139–150  ·  view source on GitHub ↗

Disassemble a traceback (default: last traceback).

(tb=None, *, file=None, show_caches=False, adaptive=False, show_offsets=False, show_positions=False)

Source from the content-addressed store, hash-verified

137 type(x).__name__)
138
139def distb(tb=None, *, file=None, show_caches=False, adaptive=False, show_offsets=False, show_positions=False):
140 """Disassemble a traceback (default: last traceback)."""
141 if tb is None:
142 try:
143 if hasattr(sys, 'last_exc'):
144 tb = sys.last_exc.__traceback__
145 else:
146 tb = sys.last_traceback
147 except AttributeError:
148 raise RuntimeError("no last traceback to disassemble") from None
149 while tb.tb_next: tb = tb.tb_next
150 disassemble(tb.tb_frame.f_code, tb.tb_lasti, file=file, show_caches=show_caches, adaptive=adaptive, show_offsets=show_offsets, show_positions=show_positions)
151
152# The inspect module interrogates this dictionary to build its
153# list of CO_* constants. It is also used by pretty_flags to

Callers 1

disFunction · 0.85

Calls 2

hasattrFunction · 0.85
disassembleFunction · 0.85

Tested by

no test coverage detected