summaryrefslogtreecommitdiffstats
path: root/Lib/_abcoll.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_abcoll.py')
-rw-r--r--Lib/_abcoll.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/_abcoll.py b/Lib/_abcoll.py
index cac06e0..0957553 100644
--- a/Lib/_abcoll.py
+++ b/Lib/_abcoll.py
@@ -90,7 +90,8 @@ class Iterator(Iterable):
@classmethod
def __subclasshook__(cls, C):
if cls is Iterator:
- if any("__next__" in B.__dict__ for B in C.__mro__):
+ if (any("__next__" in B.__dict__ for B in C.__mro__) and
+ any("__iter__" in B.__dict__ for B in C.__mro__)):
return True
return NotImplemented