'Return True if other represents an object with the same key.'

def __eq__(self, other):

    if (type(self) == type(other)):
        return ((self.type() == other.type()) and (self.data() == other.data()))
    else:
        return NotImplemented
