import six


def as_set(container):
    """ Return a set from an iterable, being careful not to disassemble
    strings.
        >>> iterable_to_set(['foo'])
        set(['foo'])
        >>> iterable_to_set('foo')
        set(['foo'])
    """
    if isinstance(container, six.string_types):
        container = (container,)
    return set(container)