Tim Chase wrote: > I'm not sure if '__iter__' is the right thing to be looking for, > but it seems to work at least for lists, sets, dictionarys (via > their keys), etc. I would use it because at least then you know > you can iterate over it
AFAIK and as seen throughout posts on c.l.py, the best way to check if
something is iterable is:
try:
iter(obj)
except TypeError:
<obj is not iterable>
else:
<obj is iterable>
- Tal
--
http://mail.python.org/mailman/listinfo/python-list
