def write_inet(f, addrtuple):
    addr, port = addrtuple
    if addr in ':':
        addrfam = socket.AF_INET6
    else:
        addrfam = socket.AF_INET
    addrbytes = util.inet_pton(addrfam, addr)
    write_byte(f, len(addrbytes))
    f.write(addrbytes)
    write_int(f, port)
dataset/ETHPy150Open datastax/python-driver/cassandra/protocol.py/write_inet/swapped operands of `in`