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

Method setitem

crates/vm/src/builtins/weakproxy.rs:112–120  ·  view source on GitHub ↗
(
        &self,
        needle: PyObjectRef,
        value: PyObjectRef,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

110 }
111
112 fn setitem(
113 &self,
114 needle: PyObjectRef,
115 value: PyObjectRef,
116 vm: &VirtualMachine,
117 ) -> PyResult<()> {
118 let obj = self.try_upgrade(vm)?;
119 obj.set_item(&*needle, value, vm)
120 }
121
122 fn delitem(&self, needle: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
123 let obj = self.try_upgrade(vm)?;

Callers

nothing calls this directly

Calls 2

try_upgradeMethod · 0.45
set_itemMethod · 0.45

Tested by

no test coverage detected