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

Method _checkClosed

Lib/_pyio.py:470–475  ·  view source on GitHub ↗

Internal: raise a ValueError if file is closed

(self, msg=None)

Source from the content-addressed store, hash-verified

468 return self.__closed
469
470 def _checkClosed(self, msg=None):
471 """Internal: raise a ValueError if file is closed
472 """
473 if self.closed:
474 raise ValueError("I/O operation on closed file."
475 if msg is None else msg)
476
477 ### Context manager ###
478

Callers 15

flushMethod · 0.95
__enter__Method · 0.95
isattyMethod · 0.95
__iter__Method · 0.95
writelinesMethod · 0.95
readintoMethod · 0.45
writeMethod · 0.45
filenoMethod · 0.45
truncateMethod · 0.45
peekMethod · 0.45
read1Method · 0.45
_readintoMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected