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.
()
| 122 | return _state.filename() |
| 123 | |
| 124 | def 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 | |
| 134 | def filelineno(): |
| 135 | """ |