Use xrange in the example

This commit is contained in:
Raymond Hettinger 2012-02-01 08:55:21 -08:00
parent 9f55b63060
commit 6ab9813605
1 changed files with 1 additions and 1 deletions

View File

@ -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)