8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abedbfd commit 7d40f45Copy full SHA for 7d40f45
tests/snippets/list.py
@@ -619,3 +619,16 @@ def iadd_slice():
619
assert_raises(TypeError, iadd_slice)
620
621
622
+it = iter([1,2,3,4])
623
+assert it.__length_hint__() == 4
624
+assert next(it) == 1
625
+assert it.__length_hint__() == 3
626
+assert list(it) == [2,3,4]
627
+assert it.__length_hint__() == 0
628
+
629
+it = reversed([1,2,3,4])
630
631
+assert next(it) == 4
632
633
+assert list(it) == [3,2,1]
634
0 commit comments