同一类的方法参数的类型

时间:2018-06-05 15:09:29

标签: python python-3.x typing

我想设置参数的类型,如下所示:

void query_ip(res_state res, const char *host, char ip[])
{
    u_char answer[NS_PACKETSZ];//NS_IN6ADDRSZ NS_PACKETSZ
    int len = res_nquery(res, host, ns_c_in, ns_t_a, answer, sizeof(answer));

    ns_msg handle;
    ns_initparse(answer, len, &handle);


    if(ns_msg_count(handle, ns_s_an) > 0) {
        ns_rr rr;
        if(ns_parserr(&handle, ns_s_an, 0, &rr) == 0) {
            strcpy(ip, inet_ntoa(*(struct in_addr *)ns_rr_rdata(rr)));
        }
    }
}

当我尝试这样做时,会引发错误:NameError:name'Tree'未定义

1 个答案:

答案 0 :(得分:2)

在同一个班级中,您必须将该类型放在引号中:

 =IFERROR(VLOOKUP($A3,CONCATENATE("'G:\Financial\Facility Work Papers and 
 Financials\1. Operating Entities\Arbors Major Hospital\2. 
 Financials\2018\",BB1,"\[Arbors"," ",BB2," ","2018.xls]Trial 
 Balance'")!$A$30:$H$100,8,FALSE),0)