#include namespace py = pybind11; PYBIND11_MODULE(example, m) { py::class_(m, "Pet") .def(py::init()) .def("setName_T", &Pet::setName) .def("getName", &Pet::getName); } auto three()->int { return 3; }