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

Method __rsub__

crates/vm/src/builtins/set.rs:640–654  ·  view source on GitHub ↗
(
        zelf: PyRef<Self>,
        other: PyObjectRef,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

638 }
639
640 fn __rsub__(
641 zelf: PyRef<Self>,
642 other: PyObjectRef,
643 vm: &VirtualMachine,
644 ) -> PyResult<PyArithmeticValue<Self>> {
645 if let Ok(other) = AnySet::try_from_object(vm, other) {
646 Ok(PyArithmeticValue::Implemented(Self {
647 inner: other
648 .as_inner()
649 .difference(ArgIterable::try_from_object(vm, zelf.into())?, vm)?,
650 }))
651 } else {
652 Ok(PyArithmeticValue::NotImplemented)
653 }
654 }
655
656 fn __xor__(
657 &self,

Callers

nothing calls this directly

Calls 2

as_innerMethod · 0.80
differenceMethod · 0.45

Tested by

no test coverage detected