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

Method intersection_update

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

Source from the content-addressed store, hash-verified

396 }
397
398 fn intersection_update(
399 &self,
400 others: impl core::iter::Iterator<Item = ArgIterable>,
401 vm: &VirtualMachine,
402 ) -> PyResult<()> {
403 let temp_inner = self.fold_op(others, Self::intersection, vm)?;
404 self.clear();
405 for obj in temp_inner.elements() {
406 self.add(obj, vm)?;
407 }
408 Ok(())
409 }
410
411 fn difference_update(
412 &self,

Callers 1

__iand__Method · 0.45

Calls 5

fold_opMethod · 0.80
clearMethod · 0.45
elementsMethod · 0.45
addMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected