Message364849
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:
https://pastebin.com/r3JUkH41
Is this a bug or am I missing something? |
|
Date |
User |
Action |
Args |
2020-03-23 14:34:33 | pwuertz | set | recipients:
+ pwuertz |
2020-03-23 14:34:33 | pwuertz | set | messageid: <1584974073.92.0.811600975239.issue40047@roundup.psfhosted.org> |
2020-03-23 14:34:33 | pwuertz | link | issue40047 messages |
2020-03-23 14:34:33 | pwuertz | create | |
|