rename args_kw_only to kwonly
diff --git a/docs/advanced/functions.rst b/docs/advanced/functions.rst
index c779053..984b046 100644
--- a/docs/advanced/functions.rst
+++ b/docs/advanced/functions.rst
@@ -378,14 +378,14 @@
f(1, b=2) # good
f(1, 2) # TypeError: f() takes 1 positional argument but 2 were given
-Pybind11 provides a ``py::args_kw_only`` object that allows you to implement
+Pybind11 provides a ``py::kwonly`` object that allows you to implement
the same behaviour by specifying the object between positional and keyword-only
argument annotations when registering the function:
.. code-block:: cpp
m.def("f", [](int a, int b) { /* ... */ },
- py::arg("a"), py::args_kw_only(), py::arg("b"));
+ py::arg("a"), py::kwonly(), py::arg("b"));
Note that, as in Python, you cannot combine this with a ``py::args`` argument.
This feature does *not* require Python 3 to work.