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

Method __sub__

crates/vm/src/builtins/dict.rs:1195–1199  ·  view source on GitHub ↗
(zelf: PyRef<Self>, other: ArgIterable, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1193 }
1194
1195 fn __sub__(zelf: PyRef<Self>, other: ArgIterable, vm: &VirtualMachine) -> PyResult<PySet> {
1196 let zelf = Self::to_set(zelf, vm)?;
1197 let inner = zelf.difference(other, vm)?;
1198 Ok(PySet { inner })
1199 }
1200
1201 fn __rsub__(zelf: PyRef<Self>, other: ArgIterable, vm: &VirtualMachine) -> PyResult<PySet> {
1202 let left = PySetInner::from_iter(other.iter(vm)?, vm)?;

Callers

nothing calls this directly

Implementers 1

dict.rscrates/vm/src/builtins/dict.rs

Calls 1

differenceMethod · 0.45

Tested by

no test coverage detected