[docs] Fix "Enumerations and internal types" example (#4034)

* Fix binding of `Pet::Attributes`

* omit `attributes` as it's not needed

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
This commit is contained in:
Masaki Kozuki 2022-06-28 12:38:37 -07:00 committed by GitHub
parent dd3bf7fd12
commit 374a5b000a
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);