Author pwuertz
Recipients pwuertz
Date 2020-03-23.14:34:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Itertools `tee` does not seem to de-reference yielded items, even after consumption of all items from all tee-iterators.

According to the documentation (to my understanding), there shouldn't be any extra memory requirement as long as the tee-iterators are consumed in a balanced way. I.e. after an item was pulled from all iterators there shouldn't be any residual reference to it.

This is true for the example-implementation mentioned in the documentation, but `itertools.tee` doesn't de-reference items until the tee-iterator itself is deleted:

Is this a bug or am I missing something?
Date User Action Args
2020-03-23 14:34:33pwuertzsetrecipients: + pwuertz
2020-03-23 14:34:33pwuertzsetmessageid: <>
2020-03-23 14:34:33pwuertzlinkissue40047 messages
2020-03-23 14:34:33pwuertzcreate