-The first extension is comprised of the functions ``isiterable`` and ``getiterator``. ``isiterable(x)`` will return ``true`` or ``false``, indicating whether ``x`` can be iterated. It is important to note that a ``true`` return value does *not* indicate that one can call the ``start`` method on ``x``, instead a consumer *must* call ``getiterator(x)`` if ``isiterable(x)`` returned ``true``, and can then call ``start`` on the instance that is returned by ``getiterator``. The proper pattern for consumer code therefore looks like this:
0 commit comments