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

Method _checkWritable

Lib/_pyio.py:1672–1674  ·  view source on GitHub ↗
(self, msg=None)

Source from the content-addressed store, hash-verified

1670 raise UnsupportedOperation('File not open for reading')
1671
1672 def _checkWritable(self, msg=None):
1673 if not self._writable:
1674 raise UnsupportedOperation('File not open for writing')
1675
1676 def read(self, size=None):
1677 """Read at most size bytes, returned as bytes.

Callers 2

writeMethod · 0.95
truncateMethod · 0.95

Calls 1

Tested by

no test coverage detected