def seek(self, pos, whence=0):
        if self.closed:
            raise ValueError("seek on closed file")
        try:
            pos = pos.__index__()
        except AttributeError as err:
            raise TypeError("an integer is required") # from err
        if whence == 0:
            if pos < 0:
                raise ValueError((pos,) % "negative seek position %r")
            self._pos = pos
        elif whence == 1:
            self._pos = max(0, self._pos + pos)
        elif whence == 2:
            self._pos = max(0, len(self._buffer) + pos)
        else:
            raise ValueError("invalid whence value")
        return self._pos
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/io.py/_BytesIO.seek/swapped operands of `%`