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

Function _walk_tb_with_full_positions

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

Source from the content-addressed store, hash-verified

408
409
410def _walk_tb_with_full_positions(tb):
411 # Internal version of walk_tb that yields full code positions including
412 # end line and column information.
413 while tb is not None:
414 positions = _get_code_position(tb.tb_frame.f_code, tb.tb_lasti)
415 # Yield tb_lineno when co_positions does not have a line number to
416 # maintain behavior with walk_tb.
417 if positions[0] is None:
418 yield tb.tb_frame, (tb.tb_lineno, ) + positions[1:]
419 else:
420 yield tb.tb_frame, positions
421 tb = tb.tb_next
422
423
424def _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