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

Method cmp

crates/vm/src/builtins/set.rs:805–814  ·  view source on GitHub ↗
(
        zelf: &crate::Py<Self>,
        other: &PyObject,
        op: PyComparisonOp,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

803
804impl Comparable for PySet {
805 fn cmp(
806 zelf: &crate::Py<Self>,
807 other: &PyObject,
808 op: PyComparisonOp,
809 vm: &VirtualMachine,
810 ) -> PyResult<PyComparisonValue> {
811 extract_set(other).map_or(Ok(PyComparisonValue::NotImplemented), |other| {
812 Ok(zelf.inner.compare(other, op, vm)?.into())
813 })
814 }
815}
816
817impl Iterable for PySet {

Callers 1

compareMethod · 0.45

Calls 2

extract_setFunction · 0.85
compareMethod · 0.45

Tested by

no test coverage detected