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

Method cmp

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

Source from the content-addressed store, hash-verified

77
78impl Comparable for PyNone {
79 fn cmp(
80 zelf: &Py<Self>,
81 other: &crate::PyObject,
82 op: PyComparisonOp,
83 _vm: &VirtualMachine,
84 ) -> PyResult<PyComparisonValue> {
85 Ok(op
86 .identical_optimization(zelf, other)
87 .map(PyComparisonValue::Implemented)
88 .unwrap_or(PyComparisonValue::NotImplemented))
89 }
90}
91
92impl Hashable for PyNone {

Callers

nothing calls this directly

Calls 2

mapMethod · 0.45

Tested by

no test coverage detected