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

Method seek

Lib/zipfile/__init__.py:896–907  ·  view source on GitHub ↗
(self, offset, whence=0)

Source from the content-addressed store, hash-verified

894 return self._pos
895
896 def seek(self, offset, whence=0):
897 with self._lock:
898 if self._writing():
899 raise ValueError("Can't reposition in the ZIP file while "
900 "there is an open writing handle on it. "
901 "Close the writing handle before trying to read.")
902 if whence == os.SEEK_CUR:
903 self._file.seek(self._pos + offset)
904 else:
905 self._file.seek(offset, whence)
906 self._pos = self._file.tell()
907 return self._pos
908
909 def read(self, n=-1):
910 with self._lock:

Callers

nothing calls this directly

Calls 2

seekMethod · 0.45
tellMethod · 0.45

Tested by

no test coverage detected