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

Method seekable

Lib/_pyio.py:1818–1828  ·  view source on GitHub ↗

True if file supports random-access.

(self)

Source from the content-addressed store, hash-verified

1816 super().close()
1817
1818 def seekable(self):
1819 """True if file supports random-access."""
1820 self._checkClosed()
1821 if self._seekable is None:
1822 try:
1823 self.tell()
1824 except OSError:
1825 self._seekable = False
1826 else:
1827 self._seekable = True
1828 return self._seekable
1829
1830 def readable(self):
1831 """True if file was opened in a read mode."""

Callers 1

testAblesMethod · 0.95

Calls 2

tellMethod · 0.95
_checkClosedMethod · 0.45

Tested by 1

testAblesMethod · 0.76