def readlines(self, sizehint=None):
lines = []<EOL>byte_count = <NUM_LIT:0><EOL>while True:<EOL><INDENT>line = self.readline()<EOL>if len(line) == <NUM_LIT:0>:<EOL><INDENT>break<EOL><DEDENT>lines.append(line)<EOL>byte_count += len(line)<EOL>if (sizehint is not None) and (byte_count >= sizehint):<EOL><INDENT>break<EOL><DEDENT><DEDENT>return lines<EOL>
Read all remaining lines using `readline` and return them as a list.
If the optional ``sizehint`` argument is present, instead of reading up
to EOF, whole lines totalling approximately sizehint bytes (possibly
after rounding up to an internal buffer size) are read.

:param int sizehint: desired maximum number of bytes to read.
:returns: list of lines read from the file.