[Mlir-commits] [mlir] [mlir][python] Fix Python binding cast diagnostics for nanobind 2.13 (PR #206391)

Maksim Levental llvmlistbot at llvm.org
Sun Jun 28 20:50:24 PDT 2026


================
@@ -43,14 +43,15 @@ static void pyListToVector(const nb::sequence &list, std::vector<CType> &result,
   for (nb::handle item : list) {
     try {
       result.push_back(nb::cast<PyType>(item));
-    } catch (nb::cast_error &err) {
+    } catch (std::exception &err) {
----------------
makslevental wrote:

But actually I guess I can narrow this to just `std::bad_cast`...

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


More information about the Mlir-commits mailing list