@@ -720,9 +720,10 @@ returns them in a tuple::
720720 zip(['a', 'b', 'c'], (1, 2, 3)) =>
721721 ('a', 1), ('b', 2), ('c', 3)
722722
723- It doesn't construct an in-memory list and exhaust all the input iterators
724- before returning; instead tuples are constructed and returned only if they're
725- requested. (The technical term for this behaviour is `lazy evaluation
723+ It doesn't construct an in-memory list and :term: `exhaust <exhausted> ` all
724+ the input iterators before returning; instead tuples are constructed and
725+ returned only if they're requested.
726+ (The technical term for this behaviour is `lazy evaluation
726727<https://en.wikipedia.org/wiki/Lazy_evaluation> `__.)
727728
728729This iterator is intended to be used with iterables that are all of the same
@@ -783,7 +784,7 @@ element *n* times, or returns the element endlessly if *n* is not provided. ::
783784:func: `itertools.chain(iterA, iterB, ...) <itertools.chain> ` takes an arbitrary
784785number of iterables as input, and returns all the elements of the first
785786iterator, then all the elements of the second, and so on, until all of the
786- iterables have been exhausted. ::
787+ iterables have been :term: ` exhausted ` . ::
787788
788789 itertools.chain(['a', 'b', 'c'], (1, 2, 3)) =>
789790 a, b, c, 1, 2, 3
@@ -878,7 +879,7 @@ iterable's results. ::
878879
879880:func: `itertools.compress(data, selectors) <itertools.compress> ` takes two
880881iterators and returns only those elements of *data * for which the corresponding
881- element of *selectors * is true, stopping whenever either one is exhausted::
882+ element of *selectors * is true, stopping whenever either one is :term: ` exhausted ` ::
882883
883884 itertools.compress([1, 2, 3, 4, 5], [True, True, False, False, True]) =>
884885 1, 2, 5
@@ -1028,7 +1029,7 @@ that takes two elements and returns a single value. :func:`functools.reduce`
10281029takes the first two elements A and B returned by the iterator and calculates
10291030``func(A, B) ``. It then requests the third element, C, calculates
10301031``func(func(A, B), C) ``, combines this result with the fourth element returned,
1031- and continues until the iterable is exhausted. If the iterable returns no
1032+ and continues until the iterable is :term: ` exhausted ` . If the iterable returns no
10321033values at all, a :exc: `TypeError ` exception is raised. If the initial value is
10331034supplied, it's used as a starting point and ``func(initial_value, A) `` is the
10341035first calculation. ::
0 commit comments