def __ne__(self, that): if len(self) != len(that): return True if isinstance(that, SortedSet): return (self._list != that._list) elif isinstance(that, set): return (self._set != that) else: _set = self._set return any(val not in _set for val in that)
def __ne__(self, that): return ((len(self) != len(that)) or any(lhs != rhs for lhs, rhs in zip(self, that)))
def isdisjoint(self, that): return not any(key in self._list for key in that)
def __ne__(self, that): return (len(self._dict) != len(that) or any((key not in that) or (self[key] != that[key]) for key in self))
def __ne__(self, that): return (len(self._dict) != len(that) or any( (key not in that) or (self[key] != that[key]) for key in self))