[Mlir-commits] [mlir] [MLIR] [PYTHON] A few improvements to the Python bindings (PR #131686)
Maksim Levental
llvmlistbot at llvm.org
Mon Mar 17 16:47:06 PDT 2025
================
@@ -546,6 +557,9 @@ class PyOperationList {
nb::object dunderGetItem(intptr_t index) {
parentOperation->checkValid();
+ if (index < 0) {
+ index += dunderLen();
+ }
if (index < 0) {
throw nb::index_error("attempt to access out of bounds operation");
}
----------------
makslevental wrote:
same and below?
https://github.com/llvm/llvm-project/pull/131686
More information about the Mlir-commits
mailing list