MCPcopy Index your code
hub / github.com/python/cpython / from_traceback

Method from_traceback

Lib/dis.py:1087–1093  ·  view source on GitHub ↗

Construct a Bytecode from the given traceback

(cls, tb, *, show_caches=False, adaptive=False)

Source from the content-addressed store, hash-verified

1085
1086 @classmethod
1087 def from_traceback(cls, tb, *, show_caches=False, adaptive=False):
1088 """ Construct a Bytecode from the given traceback """
1089 while tb.tb_next:
1090 tb = tb.tb_next
1091 return cls(
1092 tb.tb_frame.f_code, current_offset=tb.tb_lasti, show_caches=show_caches, adaptive=adaptive
1093 )
1094
1095 def info(self):
1096 """Return formatted information about the code object."""

Callers 2

test_from_tracebackMethod · 0.80

Calls 1

clsClass · 0.50

Tested by 2

test_from_tracebackMethod · 0.64