[Python-checkins] cpython (2.7): Use xrange in the example
raymond.hettinger
python-checkins at python.org
Wed Feb 1 17:55:32 CET 2012
http://hg.python.org/cpython/rev/94b69bae61eb
changeset: 74705:94b69bae61eb
branch: 2.7
user: Raymond Hettinger <python at rcn.com>
date: Wed Feb 01 08:55:21 2012 -0800
summary:
Use xrange in the example
files:
Doc/library/itertools.rst | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -593,7 +593,7 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list