diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-22 02:17:42 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-22 02:17:42 (GMT) |
commit | 37b8200608c8c78b45d41b032aed4f9d9e5c8151 (patch) | |
tree | d659321e3f5141e44074a37baae7d9087f159939 /Lib/codecs.py | |
parent | c52eeab0620628e329aa5979529f15722dbc9e81 (diff) | |
download | cpython-37b8200608c8c78b45d41b032aed4f9d9e5c8151.zip cpython-37b8200608c8c78b45d41b032aed4f9d9e5c8151.tar.gz cpython-37b8200608c8c78b45d41b032aed4f9d9e5c8151.tar.bz2 |
Merged revisions 81461 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81461 | victor.stinner | 2010-05-22 04:16:27 +0200 (sam., 22 mai 2010) | 10 lines
Merged revisions 81459 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81459 | victor.stinner | 2010-05-22 04:11:07 +0200 (sam., 22 mai 2010) | 3 lines
Issue #6268: Fix seek() method of codecs.open(), don't read the BOM twice
after seek(0)
........
................
Diffstat (limited to 'Lib/codecs.py')
-rw-r--r-- | Lib/codecs.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/codecs.py b/Lib/codecs.py index f05c4f7..9490602 100644 --- a/Lib/codecs.py +++ b/Lib/codecs.py @@ -699,6 +699,10 @@ class StreamReaderWriter: self.reader.reset() self.writer.reset() + def seek(self, offset, whence=0): + self.reader.seek(offset, whence) + self.writer.seek(offset, whence) + def __getattr__(self, name, getattr=getattr): |