[Python-checkins] r58583 - in python/trunk/Doc: glossary.rst howto/functional.rst howto/regex.rst library/autogil.rst library/cookielib.rst library/csv.rst library/ctypes.rst library/dis.rst library/exceptions.rst library/functions.rst library/glob.rst library/heapq.rst library/itertools.rst library/pickletools.rst library/re.rst library/sqlite3.rst library/urllib.rst library/weakref.rst library/wsgiref.rst library/xml.etree.elementtree.rst

georg.brandl python-checkins at python.org
Sun Oct 21 14:10:28 CEST 2007


Author: georg.brandl
Date: Sun Oct 21 14:10:28 2007
New Revision: 58583

Modified:
   python/trunk/Doc/glossary.rst
   python/trunk/Doc/howto/functional.rst
   python/trunk/Doc/howto/regex.rst
   python/trunk/Doc/library/autogil.rst
   python/trunk/Doc/library/cookielib.rst
   python/trunk/Doc/library/csv.rst
   python/trunk/Doc/library/ctypes.rst
   python/trunk/Doc/library/dis.rst
   python/trunk/Doc/library/exceptions.rst
   python/trunk/Doc/library/functions.rst
   python/trunk/Doc/library/glob.rst
   python/trunk/Doc/library/heapq.rst
   python/trunk/Doc/library/itertools.rst
   python/trunk/Doc/library/pickletools.rst
   python/trunk/Doc/library/re.rst
   python/trunk/Doc/library/sqlite3.rst
   python/trunk/Doc/library/urllib.rst
   python/trunk/Doc/library/weakref.rst
   python/trunk/Doc/library/wsgiref.rst
   python/trunk/Doc/library/xml.etree.elementtree.rst
Log:
Add :term:s for iterator.


Modified: python/trunk/Doc/glossary.rst
==============================================================================
--- python/trunk/Doc/glossary.rst	(original)
+++ python/trunk/Doc/glossary.rst	Sun Oct 21 14:10:28 2007
@@ -225,6 +225,8 @@
       with an iterator will just return the same exhausted iterator object used
       in the previous iteration pass, making it appear like an empty container.
     
+      More information can be found in :ref:`typeiter`.
+
    LBYL
       Look before you leap.  This coding style explicitly tests for
       pre-conditions before making calls or lookups.  This style contrasts with

Modified: python/trunk/Doc/howto/functional.rst
==============================================================================
--- python/trunk/Doc/howto/functional.rst	(original)
+++ python/trunk/Doc/howto/functional.rst	Sun Oct 21 14:10:28 2007
@@ -13,7 +13,7 @@
 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`.
 
 

Modified: python/trunk/Doc/howto/regex.rst
==============================================================================
--- python/trunk/Doc/howto/regex.rst	(original)
+++ python/trunk/Doc/howto/regex.rst	Sun Oct 21 14:10:28 2007
@@ -354,7 +354,7 @@
 |                  | 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 @@
 
 :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

Modified: python/trunk/Doc/library/autogil.rst
==============================================================================
--- python/trunk/Doc/library/autogil.rst	(original)
+++ python/trunk/Doc/library/autogil.rst	Sun Oct 21 14:10:28 2007
@@ -9,8 +9,8 @@
 
 
 The :mod:`autoGIL` module provides a function :func:`installAutoGIL` that
-automatically locks and unlocks Python's Global Interpreter Lock when running an
-event loop.
+automatically locks and unlocks Python's :term:`Global Interpreter Lock` when
+running an event loop.
 
 
 .. exception:: AutoGILError

Modified: python/trunk/Doc/library/cookielib.rst
==============================================================================
--- python/trunk/Doc/library/cookielib.rst	(original)
+++ python/trunk/Doc/library/cookielib.rst	Sun Oct 21 14:10:28 2007
@@ -144,7 +144,7 @@
 CookieJar and FileCookieJar Objects
 -----------------------------------
 
-:class:`CookieJar` objects support the iterator protocol for iterating over
+:class:`CookieJar` objects support the :term:`iterator` protocol for iterating over
 contained :class:`Cookie` objects.
 
 :class:`CookieJar` has the following methods:

Modified: python/trunk/Doc/library/csv.rst
==============================================================================
--- python/trunk/Doc/library/csv.rst	(original)
+++ python/trunk/Doc/library/csv.rst	Sun Oct 21 14:10:28 2007
@@ -62,7 +62,7 @@
 .. function:: reader(csvfile[, dialect='excel'][, fmtparam])
 
    Return a reader object which will iterate over lines in the given *csvfile*.
-   *csvfile* can be any object which supports the iterator protocol and returns a
+   *csvfile* can be any object which supports the :term:`iterator` protocol and returns a
    string each time its :meth:`next` method is called --- file objects and list
    objects are both suitable.   If *csvfile* is a file object, it must be opened
    with the 'b' flag on platforms where that makes a difference.  An optional

Modified: python/trunk/Doc/library/ctypes.rst
==============================================================================
--- python/trunk/Doc/library/ctypes.rst	(original)
+++ python/trunk/Doc/library/ctypes.rst	Sun Oct 21 14:10:28 2007
@@ -1368,8 +1368,8 @@
    :class:`WinDLL` and :class:`OleDLL` use the standard calling convention on this
    platform.
 
-The Python GIL is released before calling any function exported by these
-libraries, and reacquired afterwards.
+The Python :term:`global interpreter lock` is released before calling any
+function exported by these libraries, and reacquired afterwards.
 
 
 .. class:: PyDLL(name, mode=DEFAULT_MODE, handle=None)

Modified: python/trunk/Doc/library/dis.rst
==============================================================================
--- python/trunk/Doc/library/dis.rst	(original)
+++ python/trunk/Doc/library/dis.rst	Sun Oct 21 14:10:28 2007
@@ -674,10 +674,10 @@
 
 .. opcode:: FOR_ITER (delta)
 
-   ``TOS`` is an iterator.  Call its :meth:`next` method.  If this yields a new
-   value, push it on the stack (leaving the iterator below it).  If the iterator
-   indicates it is exhausted  ``TOS`` is popped, and the bytecode counter is
-   incremented by *delta*.
+   ``TOS`` is an :term:`iterator`.  Call its :meth:`next` method.  If this
+   yields a new value, push it on the stack (leaving the iterator below it).  If
+   the iterator indicates it is exhausted ``TOS`` is popped, and the bytecode
+   counter is incremented by *delta*.
 
 .. % \begin{opcodedesc}{FOR_LOOP}{delta}
 .. % This opcode is obsolete.

Modified: python/trunk/Doc/library/exceptions.rst
==============================================================================
--- python/trunk/Doc/library/exceptions.rst	(original)
+++ python/trunk/Doc/library/exceptions.rst	Sun Oct 21 14:10:28 2007
@@ -285,9 +285,10 @@
 
 .. exception:: StopIteration
 
-   Raised by an iterator's :meth:`next` method to signal that there are no further
-   values. This is derived from :exc:`Exception` rather than :exc:`StandardError`,
-   since this is not considered an error in its normal application.
+   Raised by an :term:`iterator`\'s :meth:`next` method to signal that there are
+   no further values.  This is derived from :exc:`Exception` rather than
+   :exc:`StandardError`, since this is not considered an error in its normal
+   application.
 
    .. versionadded:: 2.2
 

Modified: python/trunk/Doc/library/functions.rst
==============================================================================
--- python/trunk/Doc/library/functions.rst	(original)
+++ python/trunk/Doc/library/functions.rst	Sun Oct 21 14:10:28 2007
@@ -322,7 +322,7 @@
 
 .. 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 @@
 
    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 @@
 
 .. 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 @@
 
 .. 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
 

Modified: python/trunk/Doc/library/glob.rst
==============================================================================
--- python/trunk/Doc/library/glob.rst	(original)
+++ python/trunk/Doc/library/glob.rst	Sun Oct 21 14:10:28 2007
@@ -28,8 +28,8 @@
 
 .. function:: iglob(pathname)
 
-   Return an iterator which yields the same values as :func:`glob` without actually
-   storing them all simultaneously.
+   Return an :term:`iterator` which yields the same values as :func:`glob`
+   without actually storing them all simultaneously.
 
    .. versionadded:: 2.5
 

Modified: python/trunk/Doc/library/heapq.rst
==============================================================================
--- python/trunk/Doc/library/heapq.rst	(original)
+++ python/trunk/Doc/library/heapq.rst	Sun Oct 21 14:10:28 2007
@@ -92,8 +92,8 @@
 .. function:: merge(*iterables)
 
    Merge multiple sorted inputs into a single sorted output (for example, merge
-   timestamped entries from multiple log files).  Returns an iterator over over the
-   sorted values.
+   timestamped entries from multiple log files).  Returns an :term:`iterator`
+   over over the sorted values.
 
    Similar to ``sorted(itertools.chain(*iterables))`` but returns an iterable, does
    not pull the data into memory all at once, and assumes that each of the input

Modified: python/trunk/Doc/library/itertools.rst
==============================================================================
--- python/trunk/Doc/library/itertools.rst	(original)
+++ python/trunk/Doc/library/itertools.rst	Sun Oct 21 14:10:28 2007
@@ -10,7 +10,7 @@
 
 .. versionadded:: 2.3
 
-This module implements a number of iterator building blocks inspired by
+This module implements a number of :term:`iterator` building blocks inspired by
 constructs from the Haskell and SML programming languages.  Each has been recast
 in a form suitable for Python.
 

Modified: python/trunk/Doc/library/pickletools.rst
==============================================================================
--- python/trunk/Doc/library/pickletools.rst	(original)
+++ python/trunk/Doc/library/pickletools.rst	Sun Oct 21 14:10:28 2007
@@ -29,9 +29,9 @@
 
 .. function:: genops(pickle)
 
-   Provides an iterator over all of the opcodes in a pickle, returning a sequence
-   of ``(opcode, arg, pos)`` triples. *opcode* is an instance of an
-   :class:`OpcodeInfo` class; *arg*  is the decoded value, as a Python object, of
-   the opcode's argument;  *pos* is the position at which this opcode is located.
+   Provides an :term:`iterator` over all of the opcodes in a pickle, returning a
+   sequence of ``(opcode, arg, pos)`` triples.  *opcode* is an instance of an
+   :class:`OpcodeInfo` class; *arg* is the decoded value, as a Python object, of
+   the opcode's argument; *pos* is the position at which this opcode is located.
    *pickle* can be a string or a file-like object.
 

Modified: python/trunk/Doc/library/re.rst
==============================================================================
--- python/trunk/Doc/library/re.rst	(original)
+++ python/trunk/Doc/library/re.rst	Sun Oct 21 14:10:28 2007
@@ -568,7 +568,7 @@
 
 .. function:: finditer(pattern, string[, flags])
 
-   Return an iterator yielding :class:`MatchObject` instances over all
+   Return an :term:`iterator` yielding :class:`MatchObject` instances over all
    non-overlapping matches for the RE *pattern* in *string*.  Empty matches are
    included in the result unless they touch the beginning of another match.
 

Modified: python/trunk/Doc/library/sqlite3.rst
==============================================================================
--- python/trunk/Doc/library/sqlite3.rst	(original)
+++ python/trunk/Doc/library/sqlite3.rst	Sun Oct 21 14:10:28 2007
@@ -71,10 +71,10 @@
             ):
        c.execute('insert into stocks values (?,?,?,?,?)', t)
 
-To retrieve data after executing a SELECT statement, you can either  treat the
-cursor as an iterator, call the cursor's :meth:`fetchone` method to retrieve a
-single matching row,  or call :meth:`fetchall` to get a list of the matching
-rows.
+To retrieve data after executing a SELECT statement, you can either treat the
+cursor as an :term:`iterator`, call the cursor's :meth:`fetchone` method to
+retrieve a single matching row, or call :meth:`fetchall` to get a list of the
+matching rows.
 
 This example uses the iterator form::
 
@@ -410,9 +410,9 @@
 
 .. method:: Cursor.executemany(sql, seq_of_parameters)
 
-   Executes a SQL command against all parameter sequences or mappings found in the
-   sequence *sql*. The :mod:`sqlite3` module also allows using an iterator yielding
-   parameters instead of a sequence.
+   Executes a SQL command against all parameter sequences or mappings found in
+   the sequence *sql*.  The :mod:`sqlite3` module also allows using an
+   :term:`iterator` yielding parameters instead of a sequence.
 
    .. literalinclude:: ../includes/sqlite3/executemany_1.py
 

Modified: python/trunk/Doc/library/urllib.rst
==============================================================================
--- python/trunk/Doc/library/urllib.rst	(original)
+++ python/trunk/Doc/library/urllib.rst	Sun Oct 21 14:10:28 2007
@@ -29,7 +29,7 @@
    :exc:`IOError` exception is raised.  If all went well, a file-like object is
    returned.  This supports the following methods: :meth:`read`, :meth:`readline`,
    :meth:`readlines`, :meth:`fileno`, :meth:`close`, :meth:`info` and
-   :meth:`geturl`.  It also has proper support for the iterator protocol. One
+   :meth:`geturl`.  It also has proper support for the :term:`iterator` protocol. One
    caveat: the :meth:`read` method, if the size argument is omitted or negative,
    may not read until the end of the data stream; there is no good way to determine
    that the entire stream from a socket has been read in the general case.

Modified: python/trunk/Doc/library/weakref.rst
==============================================================================
--- python/trunk/Doc/library/weakref.rst	(original)
+++ python/trunk/Doc/library/weakref.rst	Sun Oct 21 14:10:28 2007
@@ -150,7 +150,7 @@
 
 .. method:: WeakKeyDictionary.iterkeyrefs()
 
-   Return an iterator that yields the weak references to the keys.
+   Return an :term:`iterator` that yields the weak references to the keys.
 
    .. versionadded:: 2.5
 
@@ -182,7 +182,7 @@
 
 .. method:: WeakValueDictionary.itervaluerefs()
 
-   Return an iterator that yields the weak references to the values.
+   Return an :term:`iterator` that yields the weak references to the values.
 
    .. versionadded:: 2.5
 

Modified: python/trunk/Doc/library/wsgiref.rst
==============================================================================
--- python/trunk/Doc/library/wsgiref.rst	(original)
+++ python/trunk/Doc/library/wsgiref.rst	Sun Oct 21 14:10:28 2007
@@ -126,7 +126,7 @@
 
 .. class:: FileWrapper(filelike [, blksize=8192])
 
-   A wrapper to convert a file-like object to an iterator.  The resulting objects
+   A wrapper to convert a file-like object to an :term:`iterator`.  The resulting objects
    support both :meth:`__getitem__` and :meth:`__iter__` iteration styles, for
    compatibility with Python 2.1 and Jython. As the object is iterated over, the
    optional *blksize* parameter will be repeatedly passed to the *filelike*

Modified: python/trunk/Doc/library/xml.etree.elementtree.rst
==============================================================================
--- python/trunk/Doc/library/xml.etree.elementtree.rst	(original)
+++ python/trunk/Doc/library/xml.etree.elementtree.rst	Sun Oct 21 14:10:28 2007
@@ -89,7 +89,7 @@
    Parses an XML section into an element tree incrementally, and reports what's
    going on to the user. *source* is a filename or file object containing XML data.
    *events* is a list of events to report back.  If omitted, only "end" events are
-   reported. Returns an iterator providing ``(event, elem)`` pairs.
+   reported. Returns an :term:`iterator` providing ``(event, elem)`` pairs.
 
 
 .. function:: parse(source[, parser])
@@ -318,7 +318,7 @@
 .. method:: ElementTree.findall(path)
 
    Finds all toplevel elements with the given tag. Same as getroot().findall(path).
-   *path* is the element to look for. Returns a list or iterator containing all
+   *path* is the element to look for. Returns a list or :term:`iterator` containing all
    matching elements, in document order.
 
 


More information about the Python-checkins mailing list