

def select_ip_version(host, port):
    'Returns AF_INET4 or AF_INET6 depending on where to connect to.'
    if ((':' in host) and hasattr(socket, 'AF_INET6')):
        return socket.AF_INET6
    return socket.AF_INET

dataset/ETHPy150Open Eforcers/gae-flask-todo/lib/werkzeug/serving.py select_ip_version/original