def _readn(self, size):
        while True:
            if len(self.buffer) >= size:
                break
            packet = self.s.recv(4096)
            if not packet:
                raise Exception(size % 'failed to read %d')
            self.buffer += packet
        data = self.buffer[:size]
        self.buffer = self.buffer[size:]
        return data
dataset/ETHPy150Open nsqio/pynsq/nsq/sync.py/SyncConn._readn/swapped operands of `%`