summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_heapq.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_heapq.py')
-rw-r--r--Lib/test/test_heapq.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py
index 156c835..dbbfcb0 100644
--- a/Lib/test/test_heapq.py
+++ b/Lib/test/test_heapq.py
@@ -180,7 +180,7 @@ class I:
self.i = 0
def __iter__(self):
return self
- def next(self):
+ def __next__(self):
if self.i >= len(self.seqn): raise StopIteration
v = self.seqn[self.i]
self.i += 1
@@ -200,14 +200,14 @@ class X:
def __init__(self, seqn):
self.seqn = seqn
self.i = 0
- def next(self):
+ def __next__(self):
if self.i >= len(self.seqn): raise StopIteration
v = self.seqn[self.i]
self.i += 1
return v
class N:
- 'Iterator missing next()'
+ 'Iterator missing __next__()'
def __init__(self, seqn):
self.seqn = seqn
self.i = 0
@@ -221,7 +221,7 @@ class E:
self.i = 0
def __iter__(self):
return self
- def next(self):
+ def __next__(self):
3 // 0
class S:
@@ -230,7 +230,7 @@ class S:
pass
def __iter__(self):
return self
- def next(self):
+ def __next__(self):
raise StopIteration
from itertools import chain, imap