mirror of
https://github.com/python/cpython.git
synced 2024-12-04 15:25:13 +08:00
Arghh, checked in wrong draft. Replacing with correct one.
This commit is contained in:
parent
0336e1fe8c
commit
513c8bd6f2
@ -219,7 +219,7 @@ class StringIO:
|
||||
slen = self.len
|
||||
if spos == slen:
|
||||
self.buflist.append(s)
|
||||
self.len = self.pos = slen = spos = spos + len(s)
|
||||
self.len = self.pos = spos + len(s)
|
||||
return
|
||||
if spos > slen:
|
||||
self.buflist.append('\0'*(spos - slen))
|
||||
@ -231,10 +231,11 @@ class StringIO:
|
||||
self.buflist = [self.buf[:spos], s, self.buf[newpos:]]
|
||||
self.buf = ''
|
||||
if newpos > slen:
|
||||
self.len = newpos
|
||||
slen = newpos
|
||||
else:
|
||||
self.buflist.append(s)
|
||||
self.len = newpos
|
||||
slen = newpos
|
||||
self.len = slen
|
||||
self.pos = newpos
|
||||
|
||||
def writelines(self, iterable):
|
||||
|
Loading…
Reference in New Issue
Block a user