Skip to content

Commit 486e136

Browse files
committed
cpp_function description/repr fix
1 parent b29ca09 commit 486e136

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pybind11/pybind11.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class cpp_function : public function {
202202
if (a.descr)
203203
a.descr = strdup(a.descr);
204204
else if (a.value)
205-
a.descr = strdup(a.value.attr("__repr__")().cast<std::string>().c_str());
205+
a.descr = strdup(repr(a.value).cast<std::string>().c_str());
206206
}
207207

208208
rec->is_constructor = !strcmp(rec->name, "__init__") || !strcmp(rec->name, "__setstate__");

0 commit comments

Comments
 (0)