In this case I have used hasattr(obj, "__iter__") instead of
isinstance(obj, list)
(strings are iterable but do not have __iter__ method). I think hasattr
is much better
since it works for tuples and custom iterables too.

          Michele Simionato

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to