[Mlir-commits] [mlir] [MLIR][Python] Fix typeid support for DynamicType and DynamicAttr (PR #183076)

Rolf Morel llvmlistbot at llvm.org
Wed Feb 25 04:12:55 PST 2026


================
@@ -1436,6 +1443,15 @@ void PyDynamicAttribute::bindDerived(ClassTy &c) {
     return std::string(dialectNamespace.data, dialectNamespace.length) + "." +
            std::string(name.data, name.length);
   });
+  c.def_static(
+      "get_typeid",
----------------
rolfmorel wrote:

I am probably missing something: what is it that `MyDynamicType.typeid` returns? How is it different from the proposed `MyDynamicType.get_typeid`/`MyDynamicType.lookup_typeid`?

https://github.com/llvm/llvm-project/pull/183076


More information about the Mlir-commits mailing list