summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-12 16:53:56 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-12 16:53:56 (GMT)
commitbf086a1eb3949c338cc63d98f526dbf2d89eb344 (patch)
treeaa003e6a11b701e72c4eee5d923b8812efe133c9 /Doc
parent9cb1e2771b6cce25b52ae8aa7044eeabdf8654d1 (diff)
downloadcpython-bf086a1eb3949c338cc63d98f526dbf2d89eb344.zip
cpython-bf086a1eb3949c338cc63d98f526dbf2d89eb344.tar.gz
cpython-bf086a1eb3949c338cc63d98f526dbf2d89eb344.tar.bz2
range() returns an iterable, not an iterator.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/functions.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 4689985..129aa3c 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -874,11 +874,11 @@ are always available. They are listed here in alphabetical order.
.. XXX does accept objects with __index__ too
.. function:: range([start,] stop[, step])
- This is a versatile function to create iterators yielding arithmetic
+ This is a versatile function to create iterables yielding arithmetic
progressions. It is most often used in :keyword:`for` loops. The arguments
must be integers. If the *step* argument is omitted, it defaults to ``1``.
If the *start* argument is omitted, it defaults to ``0``. The full form
- returns an iterator of integers ``[start, start + step, start + 2 * step,
+ returns an iterable of integers ``[start, start + step, start + 2 * step,
...]``. If *step* is positive, the last element is the largest ``start + i *
step`` less than *stop*; if *step* is negative, the last element is the
smallest ``start + i * step`` greater than *stop*. *step* must not be zero