def is_possible_short_number_for_region(short_numobj, region_dialing_from):
    """Check whether a short number is a possible number when dialled from a
    region. This provides a more lenient check than
    is_valid_short_number_for_region.

    Arguments:
    short_numobj -- the short number to check as a PhoneNumber object.
    region_dialing_from -- the region from which the number is dialed

    Return whether the number is a possible short number.
    """
    if not _region_dialing_from_matches_number(short_numobj, region_dialing_from):
        return False
    metadata = PhoneMetadata.short_metadata_for_region(region_dialing_from)
    if metadata is None:  # pragma no cover
        return False
    short_numlen = len(national_significant_number(short_numobj))
    return (short_numlen in metadata.general_desc.possible_length)
def is_possible_short_number_for_region ( short_numobj , region_dialing_from ) : if not _region_dialing_from_matches_number ( short_numobj , region_dialing_from ) : return False metadata = PhoneMetadata . short_metadata_for_region ( region_dialing_from ) if metadata is None : return False short_numlen = len ( national_significant_number ( short_numobj ) ) return ( short_numlen in metadata . general_desc . possible_length )
Check whether a short number is a possible number when dialled from a
    region. This provides a more lenient check than
    is_valid_short_number_for_region.

    Arguments:
    short_numobj -- the short number to check as a PhoneNumber object.
    region_dialing_from -- the region from which the number is dialed

    Return whether the number is a possible short number.