Skip to content

Commit b608303

Browse files
committed
Doc: Clarify flattening and bugfix for itertools.tee in 3.13
1 parent d0317f7 commit b608303

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

Doc/library/itertools.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -742,18 +742,6 @@ loops that truncate the stream.
742742
Previously, the first iterator in the result could be the same object as the
743743
input, causing inconsistent behavior.
744744

745-
.. doctest::
746-
747-
>>> it = iter([1, 2, 3])
748-
>>> a, b = tee(it)
749-
>>> c, d = tee(a)
750-
>>> list(b)
751-
[1, 2, 3]
752-
>>> list(c)
753-
[1, 2, 3]
754-
>>> list(d)
755-
[1, 2, 3]
756-
757745
The flattening property makes tee iterators efficiently peekable:
758746

759747
.. testcode::

0 commit comments

Comments
 (0)