MCPcopy Index your code
hub / github.com/RustPython/RustPython / readable

Method readable

Lib/bz2.py:143–146  ·  view source on GitHub ↗

Return whether the file was opened for reading.

(self)

Source from the content-addressed store, hash-verified

141 return self.readable() and self._buffer.seekable()
142
143 def readable(self):
144 """Return whether the file was opened for reading."""
145 self._check_not_closed()
146 return self._mode == _MODE_READ
147
148 def writable(self):
149 """Return whether the file was opened for writing."""

Callers 2

seekableMethod · 0.95
testReadableMethod · 0.95

Calls 1

_check_not_closedMethod · 0.80

Tested by 1

testReadableMethod · 0.76