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

Method cmp

crates/stdlib/src/_sqlite3.rs:2272–2288  ·  view source on GitHub ↗
(
            zelf: &Py<Self>,
            other: &PyObject,
            op: PyComparisonOp,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

2270
2271 impl Comparable for Row {
2272 fn cmp(
2273 zelf: &Py<Self>,
2274 other: &PyObject,
2275 op: PyComparisonOp,
2276 vm: &VirtualMachine,
2277 ) -> PyResult<PyComparisonValue> {
2278 op.eq_only(|| {
2279 if let Some(other) = other.downcast_ref::<Self>() {
2280 let eq = vm
2281 .bool_eq(zelf.description.as_object(), other.description.as_object())?
2282 && vm.bool_eq(zelf.data.as_object(), other.data.as_object())?;
2283 Ok(eq.into())
2284 } else {
2285 Ok(PyComparisonValue::NotImplemented)
2286 }
2287 })
2288 }
2289 }
2290
2291 impl Iterable for Row {

Callers

nothing calls this directly

Calls 3

eq_onlyMethod · 0.80
bool_eqMethod · 0.80
as_objectMethod · 0.45

Tested by

no test coverage detected