| 644 | int r = p_PyObject_SetAttrString(unwrap_pyobject(p), lean_string_cstr(name), unwrap_pyobject(v)); |
| 645 | if (r != 0) return raise_py_error(); |
| 646 | return lean_io_result_mk_ok(lean_box(0)); |
| 647 | } |
| 648 | |
| 649 | LEAN_EXPORT lean_obj_res lean_py_hasattr(b_lean_obj_arg p, b_lean_obj_arg name, lean_obj_arg world) { |
| 650 | (void)world; ENSURE_INIT(); WITH_GIL(); |
| 651 | int r = p_PyObject_HasAttrString(unwrap_pyobject(p), lean_string_cstr(name)); |
| 652 | return lean_io_result_mk_ok(lean_box(r ? 1 : 0)); |
nothing calls this directly
no test coverage detected