tee makes independent iterator positions by retaining values needed by lagging branches. It does not independently rerun the source and is not a bounded-memory fan-out queue.
Check the failure with a small fixture
Two iterator branches consume one source at different speeds, retaining earlier values for the slower branch.
from itertools import tee
produced = []
def source():
for n in range(6):
produced.append(n)
yield n
fast, slow = tee(source())
assert [next(fast) for _ in range(4)] == [0, 1, 2, 3]
assert produced == [0, 1, 2, 3]
assert next(slow) == 0
assert produced == [0, 1, 2, 3]
assert list(slow) == [1, 2, 3, 4, 5]
assert list(fast) == [4, 5]
assert produced == list(range(6))
print("one source execution; independent positions")What the result means
The slow branch reads values already produced for the fast branch without calling the source again. Later, slow advances the source to its end and fast receives the remaining buffered values. The produced list exists only to make this behavior visible; it is not a memory benchmark and should not be added to a real streaming pipeline.
Choose the correction for your caller
When one consumer will finish long before another starts, materializing a finite source once may make ownership and cost clearer. For a genuinely large stream, keep consumers near each other, process several outputs in the same loop, or design bounded queues with backpressure. Stop using the original iterable after splitting it: advancing it separately can deprive the branches of data. Do not share tee branches across threads as if tee provided synchronization.
Limits and the next check
The retained memory depends on lag and object sizes, with implementation overhead; this fixture does not promise a byte count. Infinite sources with a permanently stalled consumer can retain data without a finite bound.
Related: Compare a related data or execution contract.
The embedded Python example was executed as an isolated local script on November 10, 2026 (KST), using Python 3.11.6. It demonstrates the stated boundary; it is not a test of your application or a promise of compatibility with every Python release.