mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Remove superseded handle::operator() overloads
The variadic handle::operator() offers the same functionality as well as mixed positional, keyword, * and ** arguments. The tests are also superseded by the ones in `test_callbacks`.
This commit is contained in:
@@ -20,13 +20,6 @@ std::string kw_func4(const std::vector<int> &entries) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
py::object call_kw_func(py::function f) {
|
||||
py::tuple args = py::make_tuple(1234);
|
||||
py::dict kwargs;
|
||||
kwargs["y"] = py::cast(5678);
|
||||
return f(*args, **kwargs);
|
||||
}
|
||||
|
||||
py::tuple args_function(py::args args) {
|
||||
return args;
|
||||
}
|
||||
@@ -49,9 +42,7 @@ test_initializer arg_keywords_and_defaults([](py::module &m) {
|
||||
std::vector<int> list;
|
||||
list.push_back(13);
|
||||
list.push_back(17);
|
||||
|
||||
m.def("kw_func4", &kw_func4, py::arg("myList") = list);
|
||||
m.def("call_kw_func", &call_kw_func);
|
||||
|
||||
m.def("args_function", &args_function);
|
||||
m.def("args_kwargs_function", &args_kwargs_function);
|
||||
|
||||
Reference in New Issue
Block a user