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

Function filename

Lib/fileinput.py:115–122  ·  view source on GitHub ↗

Return the name of the file currently being read. Before the first line has been read, returns None.

()

Source from the content-addressed store, hash-verified

113 return _state.nextfile()
114
115def filename():
116 """
117 Return the name of the file currently being read.
118 Before the first line has been read, returns None.
119 """
120 if not _state:
121 raise RuntimeError("no active input()")
122 return _state.filename()
123
124def lineno():
125 """

Callers 1

_testFunction · 0.85

Calls 1

filenameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…