123
"""
+if IS_PY3:
+ __doc__ += """
+>>> next(123)
+Traceback (most recent call last):
+TypeError: int object is not an iterator
+"""
+
+def test_next_not_iterable(it):
+ """
+ >>> test_next_not_iterable(123)
+ Traceback (most recent call last):
+ TypeError: int object is not an iterator
+ """
+ return next(it)
+
def test_single_next(it):
"""
>>> it = iter([1,2,3])
"""
return next(it, default)
-def test_next_not_iterable(it):
- """
- >>> test_next_not_iterable(123)
- Traceback (most recent call last):
- TypeError: int object is not an iterator
- """
- return next(it)
-
def test_next_override(it):
"""
>>> it = iter([1,2,3])