File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -730,16 +730,17 @@ loops that truncate the stream.
730730 produced by the upstream :func: `tee ` call. This "flattening step"
731731 allows nested :func: `tee ` calls to share the same underlying data
732732 chain and to have a single update step rather than a chain of calls.
733+
733734 .. note ::
734735
735736 :func: `tee ` automatically "flattens" existing tee objects,
736737 sharing the same underlying buffer instead of nesting them, to avoid
737- performance degradation. This flattening behavior has existed since Python 3.7.
738+ performance degradation.
738739
739740 .. versionchanged :: 3.13
740- Fixed a bug where re-teeing the first iterator did not correctly flatten
741- the iterator chain in all cases. Previously, this could lead to unnecessary
742- nesting and performance degradation in rare scenarios .
741+ Fixed a bug where re-teeing a tee iterator did not always return independent iterators.
742+ Previously, the first iterator in the result could be the same object as the
743+ input, causing inconsistent behavior .
743744
744745 .. doctest ::
745746
You can’t perform that action at this time.
0 commit comments