diff options
Diffstat (limited to 'ext/pybind11/docs/advanced/pycpp/object.rst')
-rw-r--r-- | ext/pybind11/docs/advanced/pycpp/object.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/pybind11/docs/advanced/pycpp/object.rst b/ext/pybind11/docs/advanced/pycpp/object.rst index 8fc165d16..ae58876de 100644 --- a/ext/pybind11/docs/advanced/pycpp/object.rst +++ b/ext/pybind11/docs/advanced/pycpp/object.rst @@ -33,6 +33,8 @@ The reverse direction uses the following syntax: When conversion fails, both directions throw the exception :class:`cast_error`. +.. _calling_python_functions: + Calling Python functions ======================== @@ -57,7 +59,7 @@ In C++, the same call can be made using: .. code-block:: cpp - using pybind11::literals; // to bring in the `_a` literal + using namespace pybind11::literals; // to bring in the `_a` literal f(1234, "say"_a="hello", "to"_a=some_instance); // keyword call in C++ Unpacking of ``*args`` and ``**kwargs`` is also possible and can be mixed with |