summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-12 16:53:42 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-12 16:53:42 (GMT)
commit21f990cf0eea5c4fbab75d53ffd542eaaaa08477 (patch)
tree7684f3e300b459108361cec7c6ee1d676e33e4b5 /Doc
parente321c2f37d20fe4c3dc81f966d29216efe486917 (diff)
downloadcpython-21f990cf0eea5c4fbab75d53ffd542eaaaa08477.zip
cpython-21f990cf0eea5c4fbab75d53ffd542eaaaa08477.tar.gz
cpython-21f990cf0eea5c4fbab75d53ffd542eaaaa08477.tar.bz2
Fix parameter name for enumerate().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/functions.rst17
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 4232334..bc07d84 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -335,14 +335,15 @@ available. They are listed here in alphabetical order.
Using :func:`divmod` with complex numbers is deprecated.
-.. function:: enumerate(iterable)
-
- Return an enumerate object. *iterable* must be a sequence, an :term:`iterator`, or some
- other object which supports iteration. The :meth:`next` method of the iterator
- returned by :func:`enumerate` returns a tuple containing a count (from zero) and
- the corresponding value obtained from iterating over *iterable*.
- :func:`enumerate` is useful for obtaining an indexed series: ``(0, seq[0])``,
- ``(1, seq[1])``, ``(2, seq[2])``, .... For example:
+.. function:: enumerate(sequence)
+
+ Return an enumerate object. *sequence* must be a sequence, an
+ :term:`iterator`, or some other object which supports iteration. The
+ :meth:`next` method of the iterator returned by :func:`enumerate` returns a
+ tuple containing a count (from zero) and the corresponding value obtained
+ from iterating over *iterable*. :func:`enumerate` is useful for obtaining an
+ indexed series: ``(0, seq[0])``, ``(1, seq[1])``, ``(2, seq[2])``, .... For
+ example:
>>> for i, season in enumerate(['Spring', 'Summer', 'Fall', 'Winter']):
... print i, season