diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-01-02 20:29:41 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-01-02 20:29:41 (GMT) |
commit | 407c2ac4f73a3f1e00b6b44871880bf9849a62e2 (patch) | |
tree | 158921eced346926a1ae06b40a2c30e21ea01ffe /Doc | |
parent | 22ebb2d6ef6d822f93240e5e89ba1d7b8bc8b6c5 (diff) | |
parent | d581fff6f009812ff399b387a775218e0ddaaac3 (diff) | |
download | cpython-407c2ac4f73a3f1e00b6b44871880bf9849a62e2.zip cpython-407c2ac4f73a3f1e00b6b44871880bf9849a62e2.tar.gz cpython-407c2ac4f73a3f1e00b6b44871880bf9849a62e2.tar.bz2 |
#16747: merge with 3.2.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/glossary.rst | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst index a1f962e..68dd4c8 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -367,17 +367,17 @@ Glossary slowly. See also :term:`interactive`. iterable - An object capable of returning its members one at a - time. Examples of iterables include all sequence types (such as - :class:`list`, :class:`str`, and :class:`tuple`) and some non-sequence - types like :class:`dict` and :class:`file` and objects of any classes you - define with an :meth:`__iter__` or :meth:`__getitem__` method. Iterables - can be used in a :keyword:`for` loop and in many other places where a - sequence is needed (:func:`zip`, :func:`map`, ...). When an iterable - object is passed as an argument to the built-in function :func:`iter`, it - returns an iterator for the object. This iterator is good for one pass - over the set of values. When using iterables, it is usually not necessary - to call :func:`iter` or deal with iterator objects yourself. The ``for`` + An object capable of returning its members one at a time. Examples of + iterables include all sequence types (such as :class:`list`, :class:`str`, + and :class:`tuple`) and some non-sequence types like :class:`dict`, + :term:`file objects <file object>`, and objects of any classes you define + with an :meth:`__iter__` or :meth:`__getitem__` method. Iterables can be + used in a :keyword:`for` loop and in many other places where a sequence is + needed (:func:`zip`, :func:`map`, ...). When an iterable object is passed + as an argument to the built-in function :func:`iter`, it returns an + iterator for the object. This iterator is good for one pass over the set + of values. When using iterables, it is usually not necessary to call + :func:`iter` or deal with iterator objects yourself. The ``for`` statement does that automatically for you, creating a temporary unnamed variable to hold the iterator for the duration of the loop. See also :term:`iterator`, :term:`sequence`, and :term:`generator`. |