def write(self, b):
        if self._read_buf:
            # Undo readahead
            with self._read_lock:
                self.raw.seek(self._read_pos - len(self._read_buf), 1)
                self._reset_read_buf()
        return BufferedWriter.write(self, b)
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/_jyio.py/BufferedRandom.write/original