def __eq__(self, other, verbose=False):
if not isinstance(other, Party):<EOL><INDENT>return False<EOL><DEDENT>for family, oth_fam in zip(self.sort().families,<EOL>other.sort().families):<EOL><INDENT>if not family.__eq__(oth_fam, verbose=verbose):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return True<EOL><DEDENT>
Equality testing, rich comparison '=='.

:param other: Another object.
:return: bool

.. rubric:: Example

Compare equal Parties:

>>> party_a = Party(families=[Family(template=Template(name='a'))])
>>> party_b = Party(families=[Family(template=Template(name='a'))])
>>> party_a == party_b
True


Compare Parties with different templates:

>>> party_a = Party(families=[Family(template=Template(name='a'))])
>>> party_b = Party(families=[Family(template=Template(name='b'))])
>>> party_a == party_b
False


Compare a Party with a Family:

>>> party = Party(families=[Family(template=Template(name='a'))])
>>> family = Family(template=Template(name='a'))
>>> party == family
False