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

Method update

crates/vm/src/builtins/set.rs:355–366  ·  view source on GitHub ↗
(
        &self,
        others: impl core::iter::Iterator<Item = ArgIterable>,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

353 }
354
355 fn update(
356 &self,
357 others: impl core::iter::Iterator<Item = ArgIterable>,
358 vm: &VirtualMachine,
359 ) -> PyResult<()> {
360 for iterable in others {
361 for item in iterable.iter(vm)? {
362 self.add(item?, vm)?;
363 }
364 }
365 Ok(())
366 }
367
368 fn update_internal(&self, iterable: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
369 // check AnySet

Callers 6

_wrapFunction · 0.45
_wrapFunction · 0.45
__ior__Method · 0.45
initMethod · 0.45
with_recursionMethod · 0.45
resume_gen_frameMethod · 0.45

Calls 3

update_internalMethod · 0.80
iterMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected