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

Function _walk_tb_with_full_positions

Lib/traceback.py:426–437  ·  view source on GitHub ↗
(tb)

Source from the content-addressed store, hash-verified

424
425
426def _walk_tb_with_full_positions(tb):
427 # Internal version of walk_tb that yields full code positions including
428 # end line and column information.
429 while tb is not None:
430 positions = _get_code_position(tb.tb_frame.f_code, tb.tb_lasti)
431 # Yield tb_lineno when co_positions does not have a line number to
432 # maintain behavior with walk_tb.
433 if positions[0] is None:
434 yield tb.tb_frame, (tb.tb_lineno, ) + positions[1:]
435 else:
436 yield tb.tb_frame, positions
437 tb = tb.tb_next
438
439
440def _get_code_position(code, instruction_index):

Callers 2

extract_tbFunction · 0.85
__init__Method · 0.85

Calls 1

_get_code_positionFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…