'Return the intersection of two sets as a new set.
(I.e. all elements that are in both sets.)'

def intersection(self, other):

    if (not isinstance(other, BaseSet)):
        other = Set(other)
    if (len(self) <= len(other)):
        (little, big) = (self, other)
    else:
        (little, big) = (other, self)
    common = ifilter(big._data.__contains__, little)
    return self.__class__(common)
