summaryrefslogtreecommitdiffstats
path: root/Lib/codecs.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/codecs.py')
-rw-r--r--Lib/codecs.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/codecs.py b/Lib/codecs.py
index 185ad42..d340725 100644
--- a/Lib/codecs.py
+++ b/Lib/codecs.py
@@ -600,7 +600,7 @@ class StreamReader(Codec):
self.reset()
self.stream.seek(offset, whence)
- def next(self):
+ def __next__(self):
""" Return the next decoded line from the input stream."""
line = self.readline()
@@ -669,10 +669,10 @@ class StreamReaderWriter:
return self.reader.readlines(sizehint)
- def next(self):
+ def __next__(self):
""" Return the next decoded line from the input stream."""
- return self.reader.next()
+ return next(self.reader)
def __iter__(self):
return self
@@ -782,10 +782,10 @@ class StreamRecoder:
data, bytesencoded = self.encode(data, self.errors)
return data.splitlines(1)
- def next(self):
+ def __next__(self):
""" Return the next decoded line from the input stream."""
- data = self.reader.next()
+ data = next(self.reader)
data, bytesencoded = self.encode(data, self.errors)
return data