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

Function _find_lines_from_code

Lib/trace.py:331–339  ·  view source on GitHub ↗

Return dict where keys are lines in the line number table.

(code, strs)

Source from the content-addressed store, hash-verified

329 return n_hits, n_lines
330
331def _find_lines_from_code(code, strs):
332 """Return dict where keys are lines in the line number table."""
333 linenos = {}
334
335 for _, lineno in dis.findlinestarts(code):
336 if lineno not in strs:
337 linenos[lineno] = 1
338
339 return linenos
340
341def _find_lines(code, strs):
342 """Return lineno dict for all code objects reachable from code."""

Callers 1

_find_linesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…