diff options
Diffstat (limited to 'Lib/dos-8x3/stringio.py')
-rwxr-xr-x | Lib/dos-8x3/stringio.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/dos-8x3/stringio.py b/Lib/dos-8x3/stringio.py index 8efd7d8..02eb7c8 100755 --- a/Lib/dos-8x3/stringio.py +++ b/Lib/dos-8x3/stringio.py @@ -91,11 +91,15 @@ class StringIO: r = self.buf[self.pos:newpos] self.pos = newpos return r - def readlines(self): + def readlines(self, sizehint = 0): + total = 0 lines = [] line = self.readline() while line: lines.append(line) + total += len(line) + if 0 < sizehint <= total: + break line = self.readline() return lines def write(self, s): |