def __and__(self, other): if isinstance(other, (BaseMultiset, set, frozenset)): pass elif not isinstance(other, Set): return NotImplemented return self.intersection(other)