pybind11/docs/advanced
Jason Rhinelander be0d804523 Support keyword-only arguments
This adds support for a `py::args_kw_only()` annotation that can be
specified between `py::arg` annotations to indicate that any following
arguments are keyword-only.  This allows you to write:

    m.def("f", [](int a, int b) { /* ... */ },
          py::arg("a"), py::args_kw_only(), py::arg("b"));

and have it work like Python 3's:

    def f(a, *, b):
        # ...

with respect to how `a` and `b` arguments are accepted (that is, `a` can
be positional or by keyword; `b` can only be specified by keyword).
2020-04-26 18:07:51 +02:00
..
cast Change __init__(self) to __new__(cls) 2020-04-26 09:21:42 +02:00
pycpp added py::ellipsis() method for slicing of multidimensional NumPy arrays 2018-08-28 23:22:55 +02:00
classes.rst Add is_final to disallow inheritance from Python 2020-04-26 09:46:44 +02:00
embedding.rst Added function for reloading module (#1040) 2017-09-12 08:05:05 +02:00
exceptions.rst Add exception translation for std::overflow_error. (#1977) 2019-11-14 08:56:58 +01:00
functions.rst Support keyword-only arguments 2020-04-26 18:07:51 +02:00
misc.rst Fix missing word typo 2018-04-02 21:10:38 -03:00
smart_ptrs.rst Replace PYBIND11_PLUGIN with PYBIND11_MODULE 2017-05-29 03:21:19 +02:00