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

Method __xor__

crates/vm/src/builtins/set.rs:656–670  ·  view source on GitHub ↗
(
        &self,
        other: PyObjectRef,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

654 }
655
656 fn __xor__(
657 &self,
658 other: PyObjectRef,
659 vm: &VirtualMachine,
660 ) -> PyResult<PyArithmeticValue<Self>> {
661 if let Ok(other) = AnySet::try_from_object(vm, other) {
662 Ok(PyArithmeticValue::Implemented(self.op(
663 other,
664 PySetInner::symmetric_difference,
665 vm,
666 )?))
667 } else {
668 Ok(PyArithmeticValue::NotImplemented)
669 }
670 }
671
672 #[pymethod]
673 pub fn add(&self, item: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {

Callers 1

as_numberMethod · 0.45

Calls 1

opMethod · 0.80

Tested by

no test coverage detected