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

Method seek

Lib/lzma.py:253–269  ·  view source on GitHub ↗

Change the file position. The new position is specified by offset, relative to the position indicated by whence. Possible values for whence are: 0: start of stream (default): offset must not be negative 1: current stream position 2: end of stream

(self, offset, whence=io.SEEK_SET)

Source from the content-addressed store, hash-verified

251 return length
252
253 def seek(self, offset, whence=io.SEEK_SET):
254 """Change the file position.
255
256 The new position is specified by offset, relative to the
257 position indicated by whence. Possible values for whence are:
258
259 0: start of stream (default): offset must not be negative
260 1: current stream position
261 2: end of stream; offset must not be positive
262
263 Returns the new file position.
264
265 Note that seeking is emulated, so depending on the parameters,
266 this operation may be extremely slow.
267 """
268 self._check_can_seek()
269 return self._buffer.seek(offset, whence)
270
271 def tell(self):
272 """Return the current file position."""

Callers

nothing calls this directly

Calls 1

_check_can_seekMethod · 0.80

Tested by

no test coverage detected