[docs] [issue18558] Iterable glossary entry needs clarification

Stephen Paul Chappell report at bugs.python.org
Thu Aug 1 21:05:24 CEST 2013

Stephen Paul Chappell added the comment:

If my program needed to know if an object is iterable, it would be tempting to define and call the following function instead of using collections.abc.Iterable:

    def iterable(obj):
        except TypeError:
            return False
        return True

Something tells me that is not what the author of collections.abc.Iterable intended.


Python tracker <report at bugs.python.org>

More information about the docs mailing list