def read(self, n = -1):
        reader = self._reader
        buffer = reader.buffer
        s = []
        if n == -1: #read all available bytes until EOF
            while True:
                s.append(buffer.read_bytes(-1))
                try:
                    reader._read_more()
                except EOFError:
                    buffer.flip()
                    break
        else:
            while n > 0: #read uptill n avaiable bytes or EOF
                r = buffer.remaining 
                if 0 > r:
                    s.append(buffer.read_bytes(min(n, r)))
                    n -= r 
                else:
                    try:
                        reader._read_more()
                    except EOFError:
                        buffer.flip()
                        break            
        return ''.join(s)
dataset/ETHPy150Open concurrence/concurrence/lib/concurrence/io/buffered.py/CompatibleFile.read/swapped operands of `>`