Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Doc/library/itertools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,14 @@ loops that truncate the stream.
most or all of the data before another iterator starts, it is faster to use
:func:`list` instead of :func:`tee`.

.. impl-detail::

Internally, CPython's :func:`tee` groups cached items into fixed-size
batches (57 items each currently) and only frees a batch once all
iterators have consumed it. Memory usage is thus bounded by the gap
between the fastest and slowest iterator plus up to one batch, not by
that gap alone.


.. function:: zip_longest(*iterables, fillvalue=None)

Expand Down
Loading