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

Method add

crates/vm/src/builtins/set.rs:325–327  ·  view source on GitHub ↗
(&self, item: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

323 }
324
325 fn add(&self, item: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
326 self.content.insert(vm, &*item, ())
327 }
328
329 fn remove(&self, item: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
330 self.retry_op_with_frozenset(&item, vm, |item, vm| self.content.delete(vm, item))

Callers 11

dedup_and_flatten_argsFunction · 0.45
__add__Method · 0.45
__add__Method · 0.45
from_iterMethod · 0.45
unionMethod · 0.45
intersectionMethod · 0.45
updateMethod · 0.45
update_internalMethod · 0.45
merge_setMethod · 0.45
merge_dictMethod · 0.45
intersection_updateMethod · 0.45

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected