[issue18558] Iterable glossary entry needs clarification
1 Aug
2013
1 Aug
'13
2:05 p.m.
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):
try:
iter(obj)
except TypeError:
return False
return True
Something tells me that is not what the author of collections.abc.Iterable intended.
----------
_______________________________________
Python tracker
3919
Age (days ago)
3919
Last active (days ago)
0 comments
1 participants
participants (1)
-
Stephen Paul Chappell