MCPcopy Create free account
hub / github.com/pybind/pybind11 / check_kw_only_arg

Function check_kw_only_arg

include/pybind11/attr.h:485–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483};
484
485inline void check_kw_only_arg(const arg &a, function_record *r) {
486 if (r->args.size() > r->nargs_pos && (!a.name || a.name[0] == '\0')) {
487 pybind11_fail("arg(): cannot specify an unnamed argument after a kw_only() annotation or "
488 "args() argument");
489 }
490}
491
492inline void append_self_arg_if_needed(function_record *r) {
493 if (r->is_method && r->args.empty()) {

Callers 2

initMethod · 0.85
initMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected