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

Function richcompare_wrapper

crates/vm/src/types/slot.rs:541–549  ·  view source on GitHub ↗
(
    zelf: &PyObject,
    other: &PyObject,
    op: PyComparisonOp,
    vm: &VirtualMachine,
)

Source from the content-addressed store, hash-verified

539}
540
541pub(crate) fn richcompare_wrapper(
542 zelf: &PyObject,
543 other: &PyObject,
544 op: PyComparisonOp,
545 vm: &VirtualMachine,
546) -> PyResult<Either<PyObjectRef, PyComparisonValue>> {
547 vm.call_special_method(zelf, op.method_name(&vm.ctx), (other.to_owned(),))
548 .map(Either::A)
549}
550
551fn iter_wrapper(zelf: PyObjectRef, vm: &VirtualMachine) -> PyResult {
552 // slot_tp_iter: if __iter__ is None, the type is explicitly not iterable

Callers

nothing calls this directly

Calls 4

call_special_methodMethod · 0.80
mapMethod · 0.45
method_nameMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected