This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Zero
Recipients Zero, docs@python, r.david.murray, terry.reedy
Date 2013-08-01.19:05:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375383924.01.0.00621420986944.issue18558@psf.upfronthosting.co.za>
In-reply-to
Content
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):
        try:
            iter(obj)
        except TypeError:
            return False
        return True

Something tells me that is not what the author of collections.abc.Iterable intended.
History
Date User Action Args
2013-08-01 19:05:24Zerosetrecipients: + Zero, terry.reedy, r.david.murray, docs@python
2013-08-01 19:05:24Zerosetmessageid: <1375383924.01.0.00621420986944.issue18558@psf.upfronthosting.co.za>
2013-08-01 19:05:23Zerolinkissue18558 messages
2013-08-01 19:05:23Zerocreate