[all-commits] [llvm/llvm-project] c8a9a4: [MLIR] [python] A few improvements to the Python b...

Sergei Lebedev via All-commits all-commits at lists.llvm.org
Thu Mar 20 21:13:35 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c8a9a4109ac7756af3f0f5aab8c70e686a2f30b7
      https://github.com/llvm/llvm-project/commit/c8a9a4109ac7756af3f0f5aab8c70e686a2f30b7
  Author: Sergei Lebedev <185856+superbobry at users.noreply.github.com>
  Date:   2025-03-21 (Fri, 21 Mar 2025)

  Changed paths:
    M mlir/lib/Bindings/Python/IRCore.cpp
    M mlir/python/mlir/_mlir_libs/_mlir/ir.pyi
    M mlir/test/python/ir/operation.py

  Log Message:
  -----------
  [MLIR] [python] A few improvements to the Python bindings (#131686)

* `PyRegionList` is now sliceable. The dialect bindings generator seems
to assume it is sliceable already (!), yet accessing e.g. `cases` on
`scf.IndexedSwitchOp` raises a `TypeError` at runtime.
* `PyBlockList` and `PyOperationList` support negative indexing. It is
common for containers to do that in Python, and most container in the
MLIR Python bindings already allow the index to be negative.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list