summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/encodings/utf_16.py3
-rw-r--r--Lib/encodings/utf_16_be.py4
-rw-r--r--Lib/encodings/utf_16_le.py4
3 files changed, 9 insertions, 2 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():
diff --git a/Lib/encodings/utf_16_be.py b/Lib/encodings/utf_16_be.py
index 2fd28da..63ac608 100644
--- a/Lib/encodings/utf_16_be.py
+++ b/Lib/encodings/utf_16_be.py
@@ -21,7 +21,9 @@ class StreamWriter(Codec,codecs.StreamWriter):
pass
class StreamReader(Codec,codecs.StreamReader):
- pass
+
+ def readline(self, size=None):
+ raise NotImplementedError, '.readline() is not implemented for UTF-16-BE'
### encodings module API
diff --git a/Lib/encodings/utf_16_le.py b/Lib/encodings/utf_16_le.py
index fea9122..aa9d6f5 100644
--- a/Lib/encodings/utf_16_le.py
+++ b/Lib/encodings/utf_16_le.py
@@ -21,7 +21,9 @@ class StreamWriter(Codec,codecs.StreamWriter):
pass
class StreamReader(Codec,codecs.StreamReader):
- pass
+
+ def readline(self, size=None):
+ raise NotImplementedError, '.readline() is not implemented for UTF-16-LE'
### encodings module API