'Compare the stanza object with another to test for equality.
Stanzas are equal if their interfaces return the same values,
and if they are both instances of ElementBase.
:param ElementBase other: The stanza object to compare against.'

def __eq__(self, other):

    if (not isinstance(other, ElementBase)):
        return False
    values = self.values
    for key in other.keys():
        if ((key not in values) or (values[key] != other[key])):
            return False
    values = other.values
    for key in self.keys():
        if ((key not in values) or (values[key] != self[key])):
            return False
    return True
