def isiterable(obj):
    """Returns true of the given object is iterable."""
    try:
        from collections import Iterable
        if isinstance(obj, Iterable):
            return True
    except ImportError:
        pass
    try:
        iter(obj)
        return True
    except TypeError:
        return False
