def clear(self):
self._members.clear()
- def __cmp__(self, other):
- raise TypeError("cannot compare sets using cmp()")
-
def __eq__(self, other):
cdef IdentitySet other_
if isinstance(other, IdentitySet):
"""clones a SupportsAnnotations and applies an 'annotations' dictionary.
Unlike regular clones, this clone also mimics __hash__() and
- __cmp__() of the original element so that it takes its place
+ __eq__() of the original element so that it takes its place
in hashed collections.
A reference to the original element is maintained, for the important
def clear(self) -> None:
self._members.clear()
- def __cmp__(self, other: Any) -> NoReturn:
- raise TypeError("cannot compare sets using cmp()")
-
def __eq__(self, other: Any) -> bool:
if isinstance(other, IdentitySet):
return self._members == other._members