def compare(self, param):
    try:
        result = getattr(self, param)
        return result
    except AttributeError:
        result = self.__default(param)
        return result
def compare(self, param):
    try:
        result = getattr(self, param)
        return result
    except AttributeError:
        result = self.__default(param)
        return result