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

Method writable

Lib/bz2.py:148–151  ·  view source on GitHub ↗

Return whether the file was opened for writing.

(self)

Source from the content-addressed store, hash-verified

146 return self._mode == _MODE_READ
147
148 def writable(self):
149 """Return whether the file was opened for writing."""
150 self._check_not_closed()
151 return self._mode == _MODE_WRITE
152
153 def peek(self, n=0):
154 """Return buffered data without advancing the file position.

Callers 1

testWritableMethod · 0.95

Calls 1

_check_not_closedMethod · 0.80

Tested by 1

testWritableMethod · 0.76