@_raise_if_closed
def seek(self, seek: int, whence: int=0) -> int:
    if (whence == 0):
        if (seek < 0):
            raise ValueError(f'negative seek value {seek}')
        self._seek = seek
    elif (whence == 1):
        self._seek = max((self._seek + seek), 0)
    elif (whence == 2):
        raise Exception
    return self._seek
@_raise_if_closed
def seek(self, seek: int, whence: int=0) -> int:
    if (whence == 0):
        if (seek < 0):
            raise ValueError(f'negative seek value {seek}')
        self._seek = seek
    elif (whence == 1):
        self._seek = max((self._seek + seek), 0)
    elif (whence == 2):
        raise Exception
    return self._seek