# Don't include redundant type for the self argument
if name == 'self': param.type = None
else: param.type = type
- param.default = default
+ param.default = html.escape(default or '')
if type or default: out.has_complex_params = True
# *args / **kwargs can still appear in the parsed signatures if
<dt>
<span class="m-doc-wrap-bumper">def <a href="" class="m-doc-self">instance_function_kwargs</a>(</span><span class="m-doc-wrap">self,
hey: int,
- what: str = 'eh?') -> Tuple[float, int]</span>
+ what: str = '<eh?>') -> Tuple[float, int]</span>
</dt>
<dd>Instance method with position or keyword args</dd>
</dl>
.def_static("static_function", &MyClass::staticFunction, "Static method with positional-only args")
.def(py::init(), "Constructor")
.def("instance_function", &MyClass::instanceFunction, "Instance method with positional-only args")
- .def("instance_function_kwargs", &MyClass::instanceFunction, "Instance method with position or keyword args", py::arg("hey"), py::arg("what") = "eh?")
+ .def("instance_function_kwargs", &MyClass::instanceFunction, "Instance method with position or keyword args", py::arg("hey"), py::arg("what") = "<eh?>")
.def("another", &MyClass::another, "Instance method with no args, 'self' is thus position-only")
.def_property("foo", &MyClass::foo, &MyClass::setFoo, "A read/write property");
}