diff options
Diffstat (limited to 'Lib/fileinput.py')
-rw-r--r-- | Lib/fileinput.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/fileinput.py b/Lib/fileinput.py index f6913eb..b8b9870 100644 --- a/Lib/fileinput.py +++ b/Lib/fileinput.py @@ -240,7 +240,7 @@ class FileInput: def __iter__(self): return self - def next(self): + def __next__(self): try: line = self._buffer[self._bufindex] except IndexError: @@ -259,7 +259,7 @@ class FileInput: if i != self._lineno: raise RuntimeError, "accessing lines out of order" try: - return self.next() + return self.__next__() except StopIteration: raise IndexError, "end of input reached" |