mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
Minor typo
This commit is contained in:
parent
431fc0e198
commit
01fada7674
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user