Skip to content

Commit 374a5b0

Browse files
authored
[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>
1 parent dd3bf7f commit 374a5b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/classes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ The binding code for this example looks as follows:
482482
.value("Cat", Pet::Kind::Cat)
483483
.export_values();
484484
485-
py::class_<Pet::Attributes> attributes(pet, "Attributes")
485+
py::class_<Pet::Attributes>(pet, "Attributes")
486486
.def(py::init<>())
487487
.def_readwrite("age", &Pet::Attributes::age);
488488

0 commit comments

Comments
 (0)