diff options
author | Raymond Hettinger <python@rcn.com> | 2004-09-23 07:00:47 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-09-23 07:00:47 (GMT) |
commit | 513c8bd6f2523f5c6bf7e99996d65691c5e36013 (patch) | |
tree | d4a49bea128eebd30f7f13c2d54a35f3c160fe26 /Lib/StringIO.py | |
parent | 0336e1fe8cd1fc7c7d6d710261305111fbbe1d52 (diff) | |
download | cpython-513c8bd6f2523f5c6bf7e99996d65691c5e36013.zip cpython-513c8bd6f2523f5c6bf7e99996d65691c5e36013.tar.gz cpython-513c8bd6f2523f5c6bf7e99996d65691c5e36013.tar.bz2 |
Arghh, checked in wrong draft. Replacing with correct one.
Diffstat (limited to 'Lib/StringIO.py')
-rw-r--r-- | Lib/StringIO.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/StringIO.py b/Lib/StringIO.py index a43e5d4..1dfc8b4 100644 --- a/Lib/StringIO.py +++ b/Lib/StringIO.py @@ -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): |