summaryrefslogtreecommitdiffstats
path: root/Lib/encodings/utf_16.py
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2002-04-05 12:12:00 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2002-04-05 12:12:00 (GMT)
commit3ccb09cba3e966d50f108406a86b9b9cac56c66e (patch)
tree9072645189e91ee6500c0c66811ef80c9cb38691 /Lib/encodings/utf_16.py
parentffdd22f1af66ffefc1b37b454b5df6ffacc5da61 (diff)
downloadcpython-3ccb09cba3e966d50f108406a86b9b9cac56c66e.zip
cpython-3ccb09cba3e966d50f108406a86b9b9cac56c66e.tar.gz
cpython-3ccb09cba3e966d50f108406a86b9b9cac56c66e.tar.bz2
Fix for bug #222395: UTF-16 et al. don't handle .readline().
They now raise an NotImplementedError to hint to the truth ;-)
Diffstat (limited to 'Lib/encodings/utf_16.py')
-rw-r--r--Lib/encodings/utf_16.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/encodings/utf_16.py b/Lib/encodings/utf_16.py
index 72be072..2c2638f 100644
--- a/Lib/encodings/utf_16.py
+++ b/Lib/encodings/utf_16.py
@@ -53,6 +53,9 @@ class StreamReader(Codec,codecs.StreamReader):
self.bom_read = 1
return codecs.StreamReader.read(self, size)
+ def readline(self, size=None):
+ raise NotImplementedError, '.readline() is not implemented for UTF-16'
+
### encodings module API
def getregentry():