Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 def __ne__(self, that):
   return ((len(self) != len(that))
       or any(lhs != rhs for lhs, rhs in zip(self, that)))
Ejemplo n.º 4
0
 def isdisjoint(self, that):
   return not any(key in self._list for key in that)
Ejemplo n.º 5
0
 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))
Ejemplo n.º 6
0
 def isdisjoint(self, that):
     return not any(key in self._list for key in that)
Ejemplo n.º 7
0
 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))