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

Method current_line_num

Tools/gdb/libpython.py:1029–1038  ·  view source on GitHub ↗

Get current line number as an integer (1-based) Translated from PyFrame_GetLineNumber and PyCode_Addr2Line See Objects/lnotab_notes.txt

(self)

Source from the content-addressed store, hash-verified

1027 return self._frame.filename()
1028
1029 def current_line_num(self):
1030 '''Get current line number as an integer (1-based)
1031
1032 Translated from PyFrame_GetLineNumber and PyCode_Addr2Line
1033
1034 See Objects/lnotab_notes.txt
1035 '''
1036 if self.is_optimized_out():
1037 return None
1038 return self._frame.current_line_num()
1039
1040 def current_line(self):
1041 '''Get the text of the current source line as a string, with a trailing

Callers

nothing calls this directly

Calls 2

is_optimized_outMethod · 0.45
current_line_numMethod · 0.45

Tested by

no test coverage detected