summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2016-04-26 07:10:00 (GMT)
committerRaymond Hettinger <python@rcn.com>2016-04-26 07:10:00 (GMT)
commitab425aa9d3353a15e2a673eb1af121dcde720a14 (patch)
tree7f34323f5b73ca24a191401e36624f0ba8b15c3f /Doc/library
parentcd9b5c2f4062860d614875e5943ce5e7fc9436ed (diff)
downloadcpython-ab425aa9d3353a15e2a673eb1af121dcde720a14.zip
cpython-ab425aa9d3353a15e2a673eb1af121dcde720a14.tar.gz
cpython-ab425aa9d3353a15e2a673eb1af121dcde720a14.tar.bz2
Issue #16394: Note the tee() pure python equivalent is only a rough approximation.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/itertools.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 758e49b..8376f1a 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -588,7 +588,10 @@ loops that truncate the stream.
.. function:: tee(iterable, n=2)
- Return *n* independent iterators from a single iterable. Equivalent to::
+ Return *n* independent iterators from a single iterable.
+
+ The following Python code helps explain what *tee* does (although the actual
+ implementation is more complex and uses only a single underlying FIFO queue)::
def tee(iterable, n=2):
it = iter(iterable)