

def _is_number_match_OO(numobj1_in, numobj2_in):
    'Takes two phone number objects and compares them for equality.'
    numobj1 = PhoneNumber()
    numobj1.merge_from(numobj1_in)
    numobj2 = PhoneNumber()
    numobj2.merge_from(numobj2_in)
    numobj1.raw_input = None
    numobj1.country_code_source = None
    numobj1.preferred_domestic_carrier_code = None
    numobj2.raw_input = None
    numobj2.country_code_source = None
    numobj2.preferred_domestic_carrier_code = None
    if ((numobj1.extension is not None) and (len(numobj1.extension) == 0)):
        numobj1.extension = None
    if ((numobj2.extension is not None) and (len(numobj2.extension) == 0)):
        numobj2.extension = None
    if ((numobj1.extension is not None) and (numobj2.extension is not None) and (numobj1.extension != numobj2.extension)):
        return MatchType.NO_MATCH
    country_code1 = numobj1.country_code
    country_code2 = numobj2.country_code
    if ((country_code1 != 0) and (country_code2 != 0)):
        if (numobj1 == numobj2):
            return MatchType.EXACT_MATCH
        elif ((country_code1 == country_code2) and _is_national_number_suffix_of_other(numobj1, numobj2)):
            return MatchType.SHORT_NSN_MATCH
        return MatchType.NO_MATCH
    numobj1.country_code = country_code2
    if (numobj1 == numobj2):
        return MatchType.NSN_MATCH
    if _is_national_number_suffix_of_other(numobj1, numobj2):
        return MatchType.SHORT_NSN_MATCH
    return MatchType.NO_MATCH

dataset/ETHPy150Open daviddrysdale/python-phonenumbers/python/phonenumbers/phonenumberutil.py _is_number_match_OO/original