Changes by Carsten Milkau :
--
assignee: -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
___
Python tracker
<http://bugs.python.org/issu
Carsten Milkau added the comment:
Oh great! Then I can use it as-is. How about reassigning the issue to
documentation (for clarifying the inefficiency warning)?
--
___
Python tracker
<http://bugs.python.org/issue16
Carsten Milkau added the comment:
No. The sample code is a demonstration how to do it, it's by no means a
full-fledged patch.
The drawback of the current implementation is that if you tee n-fold, and then
advance one of the iterators m times, it fills n queues with m references each,
New submission from Carsten Milkau:
The memory footprint of itertools.tee can be reduced substantially by using a
shared buffer for the child iterators (see sample code). If local queues are
desired for efficient threading support, they can be combined with a global
queue, allowing to