]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Improve the implementation of itertools.tee().
authorRaymond Hettinger <python@rcn.com>
Wed, 12 Nov 2003 14:32:26 +0000 (14:32 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 12 Nov 2003 14:32:26 +0000 (14:32 +0000)
commitad983e79d6f215235d205245c2599620e33cf719
treef6dcc71e1d751c52d72b095806143a692af7d2b0
parent767126d7b979020585da0d2b35bda5aae7a40d30
Improve the implementation of itertools.tee().

Formerly, underlying queue was implemented in terms of two lists.  The
new queue is a series of singly-linked fixed length lists.

The new implementation runs much faster, supports multi-way tees, and
allows tees of tees without additional memory costs.

The root ideas for this structure were contributed by Andrew Koenig
and Guido van Rossum.
Doc/lib/libitertools.tex
Lib/test/test_itertools.py
Modules/itertoolsmodule.c