summaryrefslogtreecommitdiff
path: root/Lib/dos-8x3/stringio.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2000-09-26 17:32:27 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2000-09-26 17:32:27 +0000
commitd635b1d724e79a1d2dce416b29a95c389fdfab30 (patch)
tree91545a903b9628f4a592b6d911fd9bd23d7510b6 /Lib/dos-8x3/stringio.py
parent0872e0585196a894c8c2c2dbea1a0fdd68391c90 (diff)
downloadcpython-git-d635b1d724e79a1d2dce416b29a95c389fdfab30.tar.gz
The Usual
Diffstat (limited to 'Lib/dos-8x3/stringio.py')
-rwxr-xr-xLib/dos-8x3/stringio.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/dos-8x3/stringio.py b/Lib/dos-8x3/stringio.py
index 8efd7d8c48..02eb7c8bec 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):