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

@@ -121,12 +121,10 @@ MainWindowPy::~MainWindowPy()
Py::Object MainWindowPy::repr()
{
std::string s;
std::ostringstream s_out;
if (!_mw)
throw Py::RuntimeError("Cannot print representation of deleted object");
s_out << "MainWindow";
return Py::String(s_out.str());
return Py::String("MainWindow");
}
Py::Object MainWindowPy::getWindows(const Py::Tuple& args)