Kaydet (Commit) 6ab98136 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Use xrange in the example

üst 9f55b630
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment