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

Method __or__

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

Source from the content-addressed store, hash-verified

594 }
595
596 fn __or__(&self, other: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyArithmeticValue<Self>> {
597 if let Ok(other) = AnySet::try_from_object(vm, other) {
598 Ok(PyArithmeticValue::Implemented(self.op(
599 other,
600 PySetInner::union,
601 vm,
602 )?))
603 } else {
604 Ok(PyArithmeticValue::NotImplemented)
605 }
606 }
607
608 fn __and__(
609 &self,

Callers 1

as_numberMethod · 0.45

Calls 1

opMethod · 0.80

Tested by

no test coverage detected