Simplify repr() function

This commit is contained in:
xtemp09
2025-08-15 18:25:45 +07:00
committed by Chris Hennes
parent c7aaff410b
commit f20c1a0102
15 changed files with 33 additions and 87 deletions

View File

@@ -254,12 +254,10 @@ View3DInventor* View3DInventorPy::getView3DInventorPtr()
Py::Object View3DInventorPy::repr()
{
std::string s;
std::ostringstream s_out;
if (!getView3DInventorPtr())
throw Py::RuntimeError("Cannot print representation of deleted object");
s_out << "View3DInventor";
return Py::String(s_out.str());
return Py::String("View3DInventor");
}
View3DInventorPy::method_varargs_handler View3DInventorPy::pycxx_handler = nullptr;