def __eq__(self, other):
    try:
        return (self.__key() == other.__key())
    except AttributeError:
        if isinstance(other, Mapping):
            return (self.__key() == frozendict(other).__key())
        return False
def __eq__(self, other):
    try:
        return (self.__key() == other.__key())
    except AttributeError:
        if isinstance(other, Mapping):
            return (self.__key() == frozendict(other).__key())
        return False