Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c912a3a commit a05fa1dCopy full SHA for a05fa1d
1 file changed
Lib/StringIO.py
@@ -91,11 +91,15 @@ def readline(self, length=None):
91
r = self.buf[self.pos:newpos]
92
self.pos = newpos
93
return r
94
- def readlines(self):
+ def readlines(self, sizehint = 0):
95
+ total = 0
96
lines = []
97
line = self.readline()
98
while line:
99
lines.append(line)
100
+ total += len(line)
101
+ if 0 < sizehint <= total:
102
+ break
103
104
return lines
105
def write(self, s):
0 commit comments