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

Method difference

crates/vm/src/builtins/set.rs:266–272  ·  view source on GitHub ↗
(&self, other: ArgIterable, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

264 }
265
266 pub(super) fn difference(&self, other: ArgIterable, vm: &VirtualMachine) -> PyResult<Self> {
267 let set = self.copy();
268 for item in other.iter(vm)? {
269 set.content.delete_if_exists(vm, &*item?)?;
270 }
271 Ok(set)
272 }
273
274 pub(super) fn symmetric_difference(
275 &self,

Callers 5

collect_innerMethod · 0.45
__sub__Method · 0.45
__rsub__Method · 0.45
__rsub__Method · 0.45

Calls 5

delete_if_existsMethod · 0.80
fold_opMethod · 0.80
copyMethod · 0.45
iterMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected