def is_multicast(text):
    try:
        first = ord(dns.ipv4.inet_aton(text)[0])
        return (first >= 224 and first <= 239)
    except:
        try:
            first = ord(dns.ipv6.inet_aton(text)[0])
            return (first == 255)
        except:
            raise ValueError
Is the textual-form network address a multicast address?
dataset/ETHPy150Open catap/namebench/nb_third_party/dns/inet.py/is_multicast