def __eq__(self, other):
if not isinstance(other, type(self)):
return NotImplemented
else:
# Compare sets because order doesn't matter (foo&bar|baz is the
# same as baz|bar&foo). Use frozensets because sets are not
# hashable.
self_fc_sets = set(frozenset(x) for x in self._filterchains)
other_fc_sets = set(frozenset(x) for x in other._filterchains)
return self_fc_sets == other_fc_sets
评论列表
文章目录