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

Method _checkWritable

Lib/_pyio.py:455–460  ·  view source on GitHub ↗

Internal: raise UnsupportedOperation if file is not writable

(self, msg=None)

Source from the content-addressed store, hash-verified

453 return False
454
455 def _checkWritable(self, msg=None):
456 """Internal: raise UnsupportedOperation if file is not writable
457 """
458 if not self.writable():
459 raise UnsupportedOperation("File or stream is not writable."
460 if msg is None else msg)
461
462 @property
463 def closed(self):

Callers 2

writeMethod · 0.45
truncateMethod · 0.45

Calls 2

writableMethod · 0.95

Tested by

no test coverage detected