[Mlir-commits] [mlir] [mlir][python] fix value builders (PR #68764)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Oct 11 19:05:02 PDT 2023


================
@@ -71,6 +71,7 @@ class LocalOpView(mixin_cls, parent_opview_cls):
             ) from e
         LocalOpView.__name__ = parent_opview_cls.__name__
         LocalOpView.__qualname__ = parent_opview_cls.__qualname__
+        LocalOpView.__has_mixin__ = True
----------------
rkayaith wrote:

how about something like `LocalOpView.__ods_base__ = parent_opview_cls` + generating `getattr(OpViewCls, "__ods_base__", OpViewCls)`? then you don't have to use `__base__` (which I had to look up, and apparently is [slightly different](https://mail.python.org/pipermail/python-list/2003-April/237870.html) from `__bases__[0]`)

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


More information about the Mlir-commits mailing list