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

Function get_tb

Lib/test/test_dis.py:24–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22CACHE = dis.opmap["CACHE"]
23
24def get_tb():
25 def _error():
26 try:
27 1 / 0
28 except Exception as e:
29 tb = e.__traceback__
30 return tb
31
32 tb = _error()
33 while tb.tb_next:
34 tb = tb.tb_next
35 return tb
36
37TRACEBACK_CODE = get_tb().tb_frame.f_code
38

Callers 5

test_dis.pyFile · 0.70
test_from_tracebackMethod · 0.70

Calls 1

_errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…