summaryrefslogtreecommitdiff
path: root/Lib/_abcoll.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-11-30 01:18:17 +0000
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-11-30 01:18:17 +0000
commit1fea5c4472b29fff85ae40a8d7f0c845347ad5c6 (patch)
treea159285c250922c6e4528a12fc7b29c0f6f086bb /Lib/_abcoll.py
parent30ec1154aca1756a35c8bfe9ff35bfa77073ceba (diff)
downloadcpython-git-1fea5c4472b29fff85ae40a8d7f0c845347ad5c6.tar.gz
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.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