[Mlir-commits] [mlir] [MLIR][Python] Register `OpAttributeMap` as `Mapping` for `match` compatibility (PR #174292)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Jan 10 03:12:11 PST 2026
================
@@ -1782,6 +1782,9 @@ class MLIR_PYTHON_API_EXPORTED PyOpAttributeMap {
PyNamedAttribute dunderGetItemIndexed(intptr_t index);
+ nanobind::object getWithDefaultNamed(const std::string &key,
----------------
MaPePeR wrote:
I am not really sure, what the existing pattern/convention is for this case, tbh. It seems to be the python name (except for `dunder` and `camelCase`) with a suffix, if there is a variant?
So I changed the function name to just `get` now, because there is no variant for this function.
I hope that is what you meant.
https://github.com/llvm/llvm-project/pull/174292
More information about the Mlir-commits
mailing list