[3.6] bpo-18558: Clarify glossary entry for "Iterable" (GH-3732) (#3741) · python/cpython@01438ed (original) (raw)

Original file line number Diff line number Diff line change
@@ -535,7 +535,10 @@ Glossary
535 535 iterables include all sequence types (such as :class:`list`, :class:`str`,
536 536 and :class:`tuple`) and some non-sequence types like :class:`dict`,
537 537 :term:`file objects `, and objects of any classes you define
538 - with an :meth:`__iter__` or :meth:`__getitem__` method. Iterables can be
538 + with an :meth:`__iter__` method or with a :meth:`__getitem__` method
539 + that implements :term:`Sequence` semantics.
540 +
541 + Iterables can be
539 542 used in a :keyword:`for` loop and in many other places where a sequence is
540 543 needed (:func:`zip`, :func:`map`, ...). When an iterable object is passed
541 544 as an argument to the built-in function :func:`iter`, it returns an