Add :term:s for iterator.

This commit is contained in:
Georg Brandl 2007-10-21 12:10:28 +00:00
parent cf3fb25932
commit e7a0990113
20 changed files with 48 additions and 45 deletions

View file

@ -13,7 +13,7 @@ disclaimer.)
In this document, we'll take a tour of Python's features suitable for
implementing programs in a functional style. After an introduction to the
concepts of functional programming, we'll look at language features such as
iterators and :term:`generator`\s and relevant library modules such as
:term:`iterator`\s and :term:`generator`\s and relevant library modules such as
:mod:`itertools` and :mod:`functools`.

View file

@ -354,7 +354,7 @@ listing.
| | returns them as a list. |
+------------------+-----------------------------------------------+
| ``finditer()`` | Find all substrings where the RE matches, and |
| | returns them as an iterator. |
| | returns them as an :term:`iterator`. |
+------------------+-----------------------------------------------+
:meth:`match` and :meth:`search` return ``None`` if no match can be found. If
@ -460,7 +460,7 @@ Two :class:`RegexObject` methods return all of the matches for a pattern.
:meth:`findall` has to create the entire list before it can be returned as the
result. The :meth:`finditer` method returns a sequence of :class:`MatchObject`
instances as an iterator. [#]_ ::
instances as an :term:`iterator`. [#]_ ::
>>> iterator = p.finditer('12 drummers drumming, 11 ... 10 ...')
>>> iterator