Commit 01fada76 by Tomas Babej Committed by Jason Rhinelander

Minor typo

parent 431fc0e1
...@@ -438,7 +438,7 @@ To explicitly enable or disable this behaviour, using the ...@@ -438,7 +438,7 @@ To explicitly enable or disable this behaviour, using the
py::class_<Cat>(m, "Cat").def(py::init<>()); py::class_<Cat>(m, "Cat").def(py::init<>());
m.def("bark", [](Dog *dog) -> std::string { m.def("bark", [](Dog *dog) -> std::string {
if (dog) return "woof!"; /* Called with a Dog instance */ if (dog) return "woof!"; /* Called with a Dog instance */
else return "(no dog)"; /* Called with None, d == nullptr */ else return "(no dog)"; /* Called with None, dog == nullptr */
}, py::arg("dog").none(true)); }, py::arg("dog").none(true));
m.def("meow", [](Cat *cat) -> std::string { m.def("meow", [](Cat *cat) -> std::string {
// Can't be called with None argument // Can't be called with None argument
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment