mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 06:35:12 +00:00
[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:
parent
dd3bf7fd12
commit
374a5b000a
@ -482,7 +482,7 @@ The binding code for this example looks as follows:
|
||||
.value("Cat", Pet::Kind::Cat)
|
||||
.export_values();
|
||||
|
||||
py::class_<Pet::Attributes> attributes(pet, "Attributes")
|
||||
py::class_<Pet::Attributes>(pet, "Attributes")
|
||||
.def(py::init<>())
|
||||
.def_readwrite("age", &Pet::Attributes::age);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user