[Mlir-commits] [mlir] [MLIR][Python] Register `OpAttributeMap` as `Mapping` for `match` compatibility (PR #174292)

Rolf Morel llvmlistbot at llvm.org
Sat Jan 10 03:23:19 PST 2026


================
@@ -1782,6 +1782,9 @@ class MLIR_PYTHON_API_EXPORTED PyOpAttributeMap {
 
   PyNamedAttribute dunderGetItemIndexed(intptr_t index);
 
+  nanobind::object getWithDefaultNamed(const std::string &key,
----------------
rolfmorel wrote:

Thanks for explaining!

As there's indeed no (other) variant(s) for this function, I feel dropping the `Named` suffice is right. Having it just be `get` sounds good to me, just so it makes it easy to match up the implementation and the binding. :+1: 

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


More information about the Mlir-commits mailing list