From: Raymond Hettinger Date: Tue, 26 Apr 2016 07:10:00 +0000 (-0700) Subject: Issue #16394: Note the tee() pure python equivalent is only a rough approximation. X-Git-Tag: v3.6.0a1~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab425aa9d3353a15e2a673eb1af121dcde720a14;p=python Issue #16394: Note the tee() pure python equivalent is only a rough approximation. --- diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 758e49b282..8376f1a417 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)