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

Method __and__

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

Source from the content-addressed store, hash-verified

606 }
607
608 fn __and__(
609 &self,
610 other: PyObjectRef,
611 vm: &VirtualMachine,
612 ) -> PyResult<PyArithmeticValue<Self>> {
613 if let Ok(other) = AnySet::try_from_object(vm, other) {
614 Ok(PyArithmeticValue::Implemented(self.op(
615 other,
616 PySetInner::intersection,
617 vm,
618 )?))
619 } else {
620 Ok(PyArithmeticValue::NotImplemented)
621 }
622 }
623
624 fn __sub__(
625 &self,

Callers 1

as_numberMethod · 0.45

Calls 1

opMethod · 0.80

Tested by

no test coverage detected