Merge branch 'pybind:master' into master

This commit is contained in:
Steve R. Sun 2022-06-29 09:14:05 +08:00 committed by GitHub
commit 196a544873
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -482,7 +482,7 @@ The binding code for this example looks as follows:
.value("Cat", Pet::Kind::Cat) .value("Cat", Pet::Kind::Cat)
.export_values(); .export_values();
py::class_<Pet::Attributes> attributes(pet, "Attributes") py::class_<Pet::Attributes>(pet, "Attributes")
.def(py::init<>()) .def(py::init<>())
.def_readwrite("age", &Pet::Attributes::age); .def_readwrite("age", &Pet::Attributes::age);