Pybind:是否可以通知Python有关构造函数的参数名称? |
您所在的位置:网站首页 › python构造函数的名称 › Pybind:是否可以通知Python有关构造函数的参数名称? |
在Pybind中,可以通知Python有关函数参数的名称: m.def("add", &add, "A function which adds two numbers", py::arg("i"), py::arg("j"));(http://pybind11.readthedocs.io/en/stable/basics.html#keyword-arguments) 构造函数有类似的东西吗?Spyder(Anaconda)默认已经显示了函数的输入参数,但对于构造函数,“help”只显示:(* args,** kwargs)。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |