summaryrefslogtreecommitdiffstats
path: root/Lib/_abcoll.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-11-30 01:01:02 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-11-30 01:01:02 (GMT)
commitfdb32c15e4c5ab924b7f547c803befa58c2a490f (patch)
tree79055ed660d05d55ef2ed8ea956118b111980bd4 /Lib/_abcoll.py
parent34cc20255955151d35cef512bd29a818804e115b (diff)
downloadcpython-fdb32c15e4c5ab924b7f547c803befa58c2a490f.zip
cpython-fdb32c15e4c5ab924b7f547c803befa58c2a490f.tar.gz
cpython-fdb32c15e4c5ab924b7f547c803befa58c2a490f.tar.bz2
Merged revisions 86857 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86857 | raymond.hettinger | 2010-11-28 22:56:12 -0500 (Sun, 28 Nov 2010) | 1 line Issue #10565: Iterator ABC should require both __next__ and __iter__. ........
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