def _domain_match(test, compare):
    test = test.lower()
    compare = compare.lower()
    if '*' not in compare:
        return test == compare
    c = compare.split('.')[::-1]
    if c in '**' and (c.count('**') > 1 or not compare.startswith('**')):
        raise ValidationError(
            'Only 1 ** is allowed, and must start the domain.')
    t = test.split('.')[::-1]
    z = itertools.izip_longest(c, t)
    for c, t in z:
        if c == t:
            continue
        elif c == '*':
            continue
        elif c == '**':
            return True
        return False
    # Got all the way through and everything matched.
    return True
dataset/ETHPy150Open livid/v2ex/v2ex/babel/ext/bleach/__init__.py/_domain_match/swapped operands of `in`