def readline(self, limit=-<NUM_LIT:1>):
if not self._universal and limit < <NUM_LIT:0>:<EOL><INDENT>i = self._readbuffer.find('<STR_LIT:\n>', self._offset) + <NUM_LIT:1><EOL>if i > <NUM_LIT:0>:<EOL><INDENT>line = self._readbuffer[self._offset: i]<EOL>self._offset = i<EOL>return line<EOL><DEDENT><DEDENT>if not self._universal:<EOL><INDENT>return io.BufferedIOBase.readline(self, limit)<EOL><DEDENT>line = '<STR_LIT>'<EOL>while limit < <NUM_LIT:0> or len(line) < limit:<EOL><INDENT>readahead = self.peek(<NUM_LIT:2>)<EOL>if readahead == '<STR_LIT>':<EOL><INDENT>return line<EOL><DEDENT>match = self.PATTERN.search(readahead)<EOL>newline = match.group('<STR_LIT>')<EOL>if newline is not None:<EOL><INDENT>if self.newlines is None:<EOL><INDENT>self.newlines = []<EOL><DEDENT>if newline not in self.newlines:<EOL><INDENT>self.newlines.append(newline)<EOL><DEDENT>self._offset += len(newline)<EOL>return line + '<STR_LIT:\n>'<EOL><DEDENT>chunk = match.group('<STR_LIT>')<EOL>if limit >= <NUM_LIT:0>:<EOL><INDENT>chunk = chunk[: limit - len(line)]<EOL><DEDENT>self._offset += len(chunk)<EOL>line += chunk<EOL><DEDENT>return line<EOL>
Read and return a line from the stream.

        If limit is specified, at most limit bytes will be read.