def isiterable(obj, exclude=None):
    """
    Returns True if a type is iterable,
    or False otherwise.

    Types passed to ``exclude`` will be
    considered not iterable.
    """

    if any(isinstance(obj, cls) for cls in exclude or ()):
        return False

    try:
        iter(obj)
        return True
    except TypeError:
        return False