(self, limit=-1)
| 22 | def __init__(self, lines): |
| 23 | self.lines = lines |
| 24 | def readline(self, limit=-1): |
| 25 | result = self.lines.pop(0) + b'\r\n' |
| 26 | if limit >= 0: |
| 27 | # Re-insert the line, removing the \r\n we added. |
| 28 | self.lines.insert(0, result[limit:-2]) |
| 29 | result = result[:limit] |
| 30 | return result |
| 31 | def close(self): |
| 32 | pass |
| 33 |