[Mlir-commits] [mlir] [MLIR] [python] A few improvements to the Python bindings (PR #131686)

Mehdi Amini llvmlistbot at llvm.org
Tue Mar 18 03:39:34 PDT 2025


================
@@ -546,6 +557,9 @@ class PyOperationList {
 
   nb::object dunderGetItem(intptr_t index) {
     parentOperation->checkValid();
+    if (index < 0) {
+      index += dunderLen();
+    }
----------------
joker-eph wrote:

```suggestion
    if (index < 0)
      index += dunderLen();
```

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


More information about the Mlir-commits mailing list