def __eq__(self, other):
if isinstance(other, BaseMultiset):
return self._total == other._total and self._elements == other._elements
if isinstance(other, (set, frozenset)):
pass
elif not isinstance(other, Set):
return NotImplemented
if self._total != len(other):
return False
return self._issubset(other, False)
评论列表
文章目录