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

@@ -130,11 +130,10 @@ View3DInventorViewerPy::~View3DInventorViewerPy()
Py::Object View3DInventorViewerPy::repr()
{
std::ostringstream s_out;
if (!_viewer)
throw Py::RuntimeError("Cannot print representation of deleted object");
s_out << "View3DInventorViewer";
return Py::String(s_out.str());
return Py::String("View3DInventorViewer");
}
View3DInventorViewerPy::method_varargs_handler View3DInventorViewerPy::pycxx_handler = nullptr;
@@ -635,4 +634,4 @@ Py::Object View3DInventorViewerPy::getNavigationStyle(const Py::Tuple& args)
return Py::asObject(navigationStyle->getPyObject());
}
return Py::None();
}
}