summaryrefslogtreecommitdiff
path: root/Lib/_abcoll.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_abcoll.py')
-rw-r--r--Lib/_abcoll.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_abcoll.py b/Lib/_abcoll.py
index 73e668c11c..e7376e4a56 100644
--- a/Lib/_abcoll.py
+++ b/Lib/_abcoll.py
@@ -82,7 +82,7 @@ class Iterator(Iterable):
@classmethod
def __subclasshook__(cls, C):
if cls is Iterator:
- if _hasattr(C, "next"):
+ if _hasattr(C, "next") and _hasattr(C, "__iter__"):
return True
return NotImplemented