import string


def is_collection(obj):
    """ Returns true for any iterable which is not a string or byte sequence.
    """
    if isinstance(obj, string):
        return False
    try:
        iter(obj)
    except TypeError:
        return False
    else:
        return True