Get object name/type as string without error handling.
| 107 | |
| 108 | // Get object name/type as string without error handling. |
| 109 | std::string pyTypeStr(const pybind11::object& obj) { |
| 110 | return pyTry<std::string>( |
| 111 | [&]() { return obj.attr("__name__").cast<pybind11::str>(); }); |
| 112 | } |
| 113 | |
| 114 | std::string pyInstanceTypeStr(const pybind11::object& obj) { |
| 115 | return pyTry<std::string>([&]() { return pyTypeStr(obj.attr("__class__")); }); |
no outgoing calls
no test coverage detected