(A, B)
return False
For blocking/accepting domains.

    A and B may be host domain names or IP addresses.
For blocking/accepting domains.
For blocking / accepting domains .
def user_domain_match(A, B):
    """For blocking/accepting domains.

    A and B may be host domain names or IP addresses.

    """
    A = A.lower()
    B = B.lower()
    if not (liberal_is_HDN(A) and liberal_is_HDN(B)):
        if A == B:
            # equal IP addresses
            return True
        return False
    initial_dot = B.startswith(".")
    if initial_dot and A.endswith(B):
        return True
    if not initial_dot and A == B:
        return True
    return False
def user_domain_match ( A , B ) : A = A . lower ( ) B = B . lower ( ) if not ( liberal_is_HDN ( A ) and liberal_is_HDN ( B ) ) : if A == B : # equal IP addresses return True return False initial_dot = B . startswith ( "." ) if initial_dot and A . endswith ( B ) : return True if not initial_dot and A == B : return True return False