// Python callKwR OK demo (returns Result.Ok(value))
// @env NYASH_PLUGIN_ONLY=1
// @env NYASH_PY_AUTODECODE=1
// Run:
//   ./target/release/nyash --backend vm examples/py_callKwR_ok_demo.nyash

static box Main {
  main() {
    local py, bi, dictf, r
    py = new PyRuntimeBox()
    bi = py.import("builtins")
    dictf = bi.getattr("dict")
    // dict(a=1, b=2) => {'a': 1, 'b': 2}
    r = dictf.callKwR("a", 1, "b", 2)
    me.console.println(r) // expect Ok(PyObjectBox(...))
    // For readability, also show string form via .str()
    local s
    s = dictf.callKw("a", 1, "b", 2).str()
    me.console.println(s)
    return 0
  }
}
