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

Function extract_lineno

Lib/profiling/sampling/collector.py:33–44  ·  view source on GitHub ↗

Extract lineno from location. Args: location: tuple (lineno, end_lineno, col_offset, end_col_offset) or None Returns: int: The line number (0 for synthetic frames)

(location)

Source from the content-addressed store, hash-verified

31
32
33def extract_lineno(location):
34 """Extract lineno from location.
35
36 Args:
37 location: tuple (lineno, end_lineno, col_offset, end_col_offset) or None
38
39 Returns:
40 int: The line number (0 for synthetic frames)
41 """
42 if location is None:
43 return 0
44 return location[0]
45
46def _is_internal_frame(frame):
47 if isinstance(frame, tuple):

Callers 8

process_framesMethod · 0.70
process_framesMethod · 0.70
process_framesMethod · 0.70
_process_framesMethod · 0.70
process_framesMethod · 0.50

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…