summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-10-21 12:10:28 (GMT)
committerGeorg Brandl <georg@python.org>2007-10-21 12:10:28 (GMT)
commite7a0990113873e5f0cc5cac203f47a8dcbda9848 (patch)
treea19f8f84973bb222ee9564617004c926f41e6100 /Doc/library/functions.rst
parentcf3fb259329eedfa9d2c802b2ea5ced287c21e78 (diff)
downloadcpython-e7a0990113873e5f0cc5cac203f47a8dcbda9848.zip
cpython-e7a0990113873e5f0cc5cac203f47a8dcbda9848.tar.gz
cpython-e7a0990113873e5f0cc5cac203f47a8dcbda9848.tar.bz2
Add :term:s for iterator.
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r--Doc/library/functions.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 0d380ea..f98adce 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -322,7 +322,7 @@ available. They are listed here in alphabetical order.
.. function:: enumerate(iterable)
- Return an enumerate object. *iterable* must be a sequence, an iterator, or some
+ 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*.
@@ -420,7 +420,7 @@ available. They are listed here in alphabetical order.
Construct a list from those elements of *iterable* for which *function* returns
true. *iterable* may be either a sequence, a container which supports
- iteration, or an iterator, If *iterable* is a string or a tuple, the result
+ iteration, or an iterator. If *iterable* is a string or a tuple, the result
also has that type; otherwise it is always a list. If *function* is ``None``,
the identity function is assumed, that is, all elements of *iterable* that are
false are removed.
@@ -590,7 +590,7 @@ available. They are listed here in alphabetical order.
.. function:: iter(o[, sentinel])
- Return an iterator object. The first argument is interpreted very differently
+ Return an :term:`iterator` object. The first argument is interpreted very differently
depending on the presence of the second argument. Without a second argument, *o*
must be a collection object which supports the iteration protocol (the
:meth:`__iter__` method), or it must support the sequence protocol (the
@@ -973,9 +973,9 @@ available. They are listed here in alphabetical order.
.. function:: reversed(seq)
- Return a reverse iterator. *seq* must be an object which supports the sequence
- protocol (the :meth:`__len__` method and the :meth:`__getitem__` method with
- integer arguments starting at ``0``).
+ Return a reverse :term:`iterator`. *seq* must be an object which supports
+ the sequence protocol (the :meth:`__len__` method and the :meth:`__getitem__`
+ method with integer arguments starting at ``0``).
.. versionadded:: 2.4