From c35983276723975160a623c863c947210555d54d Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Wed, 11 Sep 2019 15:17:09 +0200 Subject: [PATCH] fix pyname for non default constructible classes --- libsrc/core/python_ngcore.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libsrc/core/python_ngcore.hpp b/libsrc/core/python_ngcore.hpp index 21f610e3..831bb56b 100644 --- a/libsrc/core/python_ngcore.hpp +++ b/libsrc/core/python_ngcore.hpp @@ -21,8 +21,7 @@ namespace ngcore struct PyNameTraits { static const std::string & GetName() { - static const std::string name = - py::cast(py::cast(T()).attr("__class__").attr("__name__")); + static const std::string name = typeid(T).name(); return name; } };