Esempio n. 1
0
 def __eq__(self, that):
   if len(self) != len(that):
     return False
   if isinstance(that, SortedSet):
     return (self._list == that._list)
   elif isinstance(that, set):
     return (self._set == that)
   else:
     _set = self._set
     return all(val in _set for val in that)
Esempio n. 2
0
 def __eq__(self, that):
     if len(self) != len(that):
         return False
     if isinstance(that, SortedSet):
         return (self._list == that._list)
     elif isinstance(that, set):
         return (self._set == that)
     else:
         _set = self._set
         return all(val in _set for val in that)
Esempio n. 3
0
 def __ge__(self, that):
   return ((len(self) >= len(that))
       and all(lhs >= rhs for lhs, rhs in zip(self, that)))
Esempio n. 4
0
 def __le__(self, that):
   return ((len(self) <= len(that))
       and all(lhs <= rhs for lhs, rhs in zip(self, that)))
Esempio n. 5
0
 def __eq__(self, that):
   return ((len(self) == len(that))
       and all(lhs == rhs for lhs, rhs in zip(self, that)))
Esempio n. 6
0
 def __eq__(self, that):
   return (len(self._dict) == len(that)
       and all((key in that) and (self[key] == that[key])
           for key in self))
Esempio n. 7
0
 def __le__(self, that):
   if isinstance(that, set):
     return (self._set <= that)
   else:
     return all(val in that for val in self._list)
Esempio n. 8
0
 def __gt__(self, that):
   if isinstance(that, set):
     return (self._set > that)
   else:
     _set = self._set
     return (len(self) > len(that)) and all(val in _set for val in that)
Esempio n. 9
0
 def __lt__(self, that):
   if isinstance(that, set):
     return (self._set < that)
   else:
     return (len(self) < len(that)) and all(val in that for val in self._list)
Esempio n. 10
0
 def __ge__(self, that):
   if isinstance(that, set):
     return (self._set >= that)
   else:
     _set = self._set
     return all(val in _set for val in that)
Esempio n. 11
0
 def __eq__(self, that):
     return (len(self._dict) == len(that) and all(
         (key in that) and (self[key] == that[key]) for key in self))
Esempio n. 12
0
 def __lt__(self, that):
     if isinstance(that, set):
         return (self._set < that)
     else:
         return (len(self) < len(that)) and all(val in that
                                                for val in self._list)
Esempio n. 13
0
 def __ge__(self, that):
     if isinstance(that, set):
         return (self._set >= that)
     else:
         _set = self._set
         return all(val in _set for val in that)
Esempio n. 14
0
 def __le__(self, that):
     if isinstance(that, set):
         return (self._set <= that)
     else:
         return all(val in that for val in self._list)
Esempio n. 15
0
 def __gt__(self, that):
     if isinstance(that, set):
         return (self._set > that)
     else:
         _set = self._set
         return (len(self) > len(that)) and all(val in _set for val in that)