MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / lasti2lineno

Function lasti2lineno

tools/python-3.11.9-amd64/Lib/pdb.py:110–116  ·  view source on GitHub ↗
(code, lasti)

Source from the content-addressed store, hash-verified

108 return None
109
110def lasti2lineno(code, lasti):
111 linestarts = list(dis.findlinestarts(code))
112 linestarts.reverse()
113 for i, lineno in linestarts:
114 if lasti >= i:
115 return lineno
116 return 0
117
118
119class _rstr(str):

Callers 1

setupMethod · 0.85

Calls 2

listFunction · 0.85
reverseMethod · 0.45

Tested by

no test coverage detected