MCPcopy Index your code
hub / github.com/RustPython/RustPython / set_attr

Method set_attr

crates/wasm/src/browser_module.rs:213–217  ·  view source on GitHub ↗
(&self, attr: PyStrRef, value: PyStrRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

211
212 #[pymethod]
213 fn set_attr(&self, attr: PyStrRef, value: PyStrRef, vm: &VirtualMachine) -> PyResult<()> {
214 self.elem
215 .set_attribute(attr.expect_str(), value.expect_str())
216 .map_err(|err| convert::js_py_typeerror(vm, err))
217 }
218 }
219
220 #[pyfunction]

Callers 1

set_stdoutMethod · 0.45

Calls 2

js_py_typeerrorFunction · 0.85
expect_strMethod · 0.80

Tested by

no test coverage detected