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

Method inner_setitem

crates/vm/src/builtins/dict.rs:208–215  ·  view source on GitHub ↗

Set item variant which can be called with multiple key types, such as str to name a notable one.

(
        &self,
        key: &K,
        value: PyObjectRef,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

206 /// Set item variant which can be called with multiple
207 /// key types, such as str to name a notable one.
208 pub(crate) fn inner_setitem<K: DictKey + ?Sized>(
209 &self,
210 key: &K,
211 value: PyObjectRef,
212 vm: &VirtualMachine,
213 ) -> PyResult<()> {
214 self.entries.insert(vm, key, value)
215 }
216
217 pub(crate) fn inner_delitem<K: DictKey + ?Sized>(
218 &self,

Callers 2

__setitem__Method · 0.80
set_itemMethod · 0.80

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected