summaryrefslogtreecommitdiffstats
path: root/Lib/encodings
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-06-14 05:21:04 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-06-14 05:21:04 (GMT)
commitd825143be1118ba7e320661b3a71d8822ae5d600 (patch)
treea74764df14558614917b7f4d9abd56c44ffd5623 /Lib/encodings
parent6ce9fe880be7416d88e6d800528db4079db6d6b1 (diff)
downloadcpython-d825143be1118ba7e320661b3a71d8822ae5d600.zip
cpython-d825143be1118ba7e320661b3a71d8822ae5d600.tar.gz
cpython-d825143be1118ba7e320661b3a71d8822ae5d600.tar.bz2
Patch #1455898: Incremental mode for "mbcs" codec.
Diffstat (limited to 'Lib/encodings')
-rw-r--r--Lib/encodings/mbcs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/encodings/mbcs.py b/Lib/encodings/mbcs.py
index ff77fde..a44ee7b 100644
--- a/Lib/encodings/mbcs.py
+++ b/Lib/encodings/mbcs.py
@@ -22,9 +22,10 @@ class IncrementalEncoder(codecs.IncrementalEncoder):
def encode(self, input, final=False):
return codecs.mbcs_encode(input,self.errors)[0]
-class IncrementalDecoder(codecs.IncrementalDecoder):
- def decode(self, input, final=False):
- return codecs.mbcs_decode(input,self.errors)[0]
+class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
+ def _buffer_decode(self, input, errors, final):
+ return codecs.mbcs_decode(input,self.errors,final)
+
class StreamWriter(Codec,codecs.StreamWriter):
pass