"git@developer.sourcefind.cn:gaoqiong/pybind11.git" did not exist on "8665ee8100e8b305e026abd6cf17841ab41f329b"
Commit 01fada76 authored by Tomas Babej's avatar Tomas Babej Committed by Jason Rhinelander
Browse files

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