def isIPv6Address(addr):
    if '%' in addr:
        addr = addr.split('%', 1)[0]
    if not addr:
        return False
    try:
        # This might be a native implementation or the one from
        # twisted.python.compat.
        inet_pton(AF_INET6, addr)
    except (ValueError, error):
        return False
    return True
Determine whether the given string represents an IPv6 address.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/internet/abstract.py/isIPv6Address