def readlines(self, hint=-1):
        """Read lines until EOF, and return them as a list.

        If *hint* is specified, then stop reading lines as soon as the total
        size of all lines exceeds *hint*.
        """
        self._check_readable()
        lines = []
        chunks = []
        bytes_read = 0
        while True:
            chunk = self._buffer.get_chunk(-1, b'\n')
            if not chunk:
                break
            chunks.append(chunk)
            if chunk.endswith(b'\n'):
                lines.append(b''.join(chunks))
                del chunks[:]
                bytes_read += len(lines[-1])
            if hint >= 0 and bytes_read > hint:
                break
        if chunks:
            lines.append(b''.join(chunks))
        if not lines and not self._buffer.eof and self._buffer.error:
            raise compat.saved_exc(self._buffer.error)
        return lines
def readlines ( self , hint = - 1 ) : self . _check_readable ( ) lines = [ ] chunks = [ ] bytes_read = 0 while True : chunk = self . _buffer . get_chunk ( - 1 , b'\n' ) if not chunk : break chunks . append ( chunk ) if chunk . endswith ( b'\n' ) : lines . append ( b'' . join ( chunks ) ) del chunks [ : ] bytes_read += len ( lines [ - 1 ] ) if hint >= 0 and bytes_read > hint : break if chunks : lines . append ( b'' . join ( chunks ) ) if not lines and not self . _buffer . eof and self . _buffer . error : raise compat . saved_exc ( self . _buffer . error ) return lines
Read lines until EOF, and return them as a list.

        If *hint* is specified, then stop reading lines as soon as the total
        size of all lines exceeds *hint*.