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

Method setattro

crates/vm/src/builtins/weakproxy.rs:161–169  ·  view source on GitHub ↗
(
        zelf: &Py<Self>,
        attr_name: &Py<PyStr>,
        value: PySetterValue,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

159
160impl SetAttr for PyWeakProxy {
161 fn setattro(
162 zelf: &Py<Self>,
163 attr_name: &Py<PyStr>,
164 value: PySetterValue,
165 vm: &VirtualMachine,
166 ) -> PyResult<()> {
167 let obj = zelf.try_upgrade(vm)?;
168 obj.call_set_attr(vm, attr_name, value)
169 }
170}
171
172fn proxy_upgrade(obj: &PyObject, vm: &VirtualMachine) -> PyResult {

Callers

nothing calls this directly

Calls 2

call_set_attrMethod · 0.80
try_upgradeMethod · 0.45

Tested by

no test coverage detected