Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
01fada76
Commit
01fada76
authored
Jan 28, 2018
by
Tomas Babej
Committed by
Jason Rhinelander
Feb 27, 2018
Browse files
Minor typo
parent
431fc0e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
docs/advanced/functions.rst
docs/advanced/functions.rst
+1
-1
No files found.
docs/advanced/functions.rst
View file @
01fada76
...
...
@@ -438,7 +438,7 @@ To explicitly enable or disable this behaviour, using the
py::class_<Cat>(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, d
og
== nullptr */
}, py::arg("dog").none(true));
m.def("meow", [](Cat *cat) -> std::string {
// Can't be called with None argument
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment