We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b29ca09 commit 486e136Copy full SHA for 486e136
include/pybind11/pybind11.h
@@ -202,7 +202,7 @@ class cpp_function : public function {
202
if (a.descr)
203
a.descr = strdup(a.descr);
204
else if (a.value)
205
- a.descr = strdup(a.value.attr("__repr__")().cast<std::string>().c_str());
+ a.descr = strdup(repr(a.value).cast<std::string>().c_str());
206
}
207
208
rec->is_constructor = !strcmp(rec->name, "__init__") || !strcmp(rec->name, "__setstate__");
0 commit comments