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

Method __setattr__

crates/vm/src/builtins/object.rs:350–357  ·  view source on GitHub ↗
(
        obj: PyObjectRef,
        name: PyStrRef,
        value: PyObjectRef,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

348 /// Implement setattr(self, name, value).
349 #[pymethod]
350 fn __setattr__(
351 obj: PyObjectRef,
352 name: PyStrRef,
353 value: PyObjectRef,
354 vm: &VirtualMachine,
355 ) -> PyResult<()> {
356 obj.generic_setattr(&name, PySetterValue::Assign(value), vm)
357 }
358
359 /// Implement delattr(self, name).
360 #[pymethod]

Callers

nothing calls this directly

Calls 1

generic_setattrMethod · 0.80

Tested by

no test coverage detected