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

Method set

crates/jit/src/lib.rs:345–349  ·  view source on GitHub ↗
(&mut self, idx: usize, value: AbiValue)

Source from the content-addressed store, hash-verified

343 }
344
345 pub fn set(&mut self, idx: usize, value: AbiValue) -> Result<(), JitArgumentError> {
346 type_check(&self.code.sig.args[idx], &value).map(|_| {
347 self.values[idx] = Some(value);
348 })
349 }
350
351 pub fn is_set(&self, idx: usize) -> bool {
352 self.values[idx].is_some()

Callers 4

child_fnFunction · 0.45
destroyMethod · 0.45
detachMethod · 0.45
fetchFunction · 0.45

Calls 3

type_checkFunction · 0.70
SomeClass · 0.50
mapMethod · 0.45

Tested by 1

child_fnFunction · 0.36