__eq__

returns True if it equals.

Source


def __eq__(self, node):
    if self._name == node._name and \
       self._attr == node._attr and \
       self._html == node._html and \
       self._parent == node._parent and:
        return True
    return False