def seek(self, offset, whence=<NUM_LIT:0>):
if self.closed:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if whence == SEEK_SET:<EOL><INDENT>pos = offset<EOL><DEDENT>elif whence == SEEK_CUR:<EOL><INDENT>pos = self.pos + offset<EOL><DEDENT>elif whence == SEEK_END:<EOL><INDENT>pos = self.size + offset<EOL><DEDENT>if not <NUM_LIT:0> <= pos <= self.size:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(pos, self.size))<EOL><DEDENT>self.pos = pos<EOL>return self.pos<EOL>
Same as `file.seek()` but for the slice. Returns a value between
`self.start` and `self.size` inclusive.

raises:
    ValueError if the new seek position is not between 0 and
    `self.size`.