From 6ab9813605213dafaea23e2907d25467b6a52178 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Wed, 1 Feb 2012 08:55:21 -0800 Subject: [PATCH] Use xrange in the example --- Doc/library/itertools.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 9b3f1c12206..a553d09964e 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -593,7 +593,7 @@ loops that truncate the stream. A common use for *repeat* is to supply a stream of constant values to *imap* or *zip*:: - >>> list(imap(pow, range(10), repeat(2))) + >>> list(imap(pow, xrange(10), repeat(2))) [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] .. function:: starmap(function, iterable)