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

Function lineno

Lib/fileinput.py:124–132  ·  view source on GitHub ↗

Return the cumulative line number of the line that has just been read. Before the first line has been read, returns 0. After the last line of the last file has been read, returns the line number of that line.

()

Source from the content-addressed store, hash-verified

122 return _state.filename()
123
124def lineno():
125 """
126 Return the cumulative line number of the line that has just been read.
127 Before the first line has been read, returns 0. After the last line
128 of the last file has been read, returns the line number of that line.
129 """
130 if not _state:
131 raise RuntimeError("no active input()")
132 return _state.lineno()
133
134def filelineno():
135 """

Callers 1

_testFunction · 0.85

Calls 1

linenoMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…