Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ close
Method
close
Lib/fileinput.py:234–238 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
232
self.close()
233
234
def
close(self):
235
try
:
236
self.nextfile()
237
finally:
238
self._files = ()
239
240
def
__enter__(self):
241
return
self
Callers
6
__del__
Method · 0.95
__exit__
Method · 0.95
test_buffer_sizes
Method · 0.95
test_zero_byte_files
Method · 0.95
close
Function · 0.45
nextfile
Method · 0.45
Calls
1
nextfile
Method · 0.95
Tested by
2
test_buffer_sizes
Method · 0.76
test_zero_byte_files
Method · 0.76