fixed python Block category attr

This commit is contained in:
fasiondog 2024-05-25 01:16:55 +08:00
parent 14a47e46d6
commit d9332aef40

View File

@ -29,7 +29,7 @@ void export_Block(py::module& m) {
.def("__str__", to_py_str<Block>) .def("__str__", to_py_str<Block>)
.def("__repr__", to_py_str<Block>) .def("__repr__", to_py_str<Block>)
.def_property("category", setCategory, getCategory, "板块所属分类") .def_property("category", getCategory, setCategory, "板块所属分类")
.def_property("name", getName, setName, "板块名称") .def_property("name", getName, setName, "板块名称")
.def_property("index_stock", &Block::getIndexStock, &Block::setIndexStock, .def_property("index_stock", &Block::getIndexStock, &Block::setIndexStock,
py::return_value_policy::copy, "对应指数") py::return_value_policy::copy, "对应指数")