Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ close
Method
close
Lib/_pyio.py:2249–2254 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
2247
self._telling = self._seekable
2248
2249
def
close(self):
2250
if
self.buffer is not None and not self.closed:
2251
try
:
2252
self.flush()
2253
finally:
2254
self.buffer.close()
2255
2256
@property
2257
def
closed(self):
Callers
4
test_close_error_on_close
Method · 0.95
test_nonnormalized_close_error_on_close
Method · 0.95
test_multi_close
Method · 0.95
test_issue142594
Method · 0.95
Calls
2
flush
Method · 0.95
close
Method · 0.45
Tested by
4
test_close_error_on_close
Method · 0.76
test_nonnormalized_close_error_on_close
Method · 0.76
test_multi_close
Method · 0.76
test_issue142594
Method · 0.76