diff --git a/docs/advanced/functions.rst b/docs/advanced/functions.rst index e3acff06b..4d28f06d2 100644 --- a/docs/advanced/functions.rst +++ b/docs/advanced/functions.rst @@ -438,7 +438,7 @@ To explicitly enable or disable this behaviour, using the py::class_(m, "Cat").def(py::init<>()); m.def("bark", [](Dog *dog) -> std::string { 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)); m.def("meow", [](Cat *cat) -> std::string { // Can't be called with None argument