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

Method rich_compare_bool

crates/vm/src/protocol/object.rs:345–355  ·  view source on GitHub ↗
(
        &self,
        other: &Self,
        op_id: PyComparisonOp,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

343 }
344 #[inline(always)]
345 pub fn rich_compare_bool(
346 &self,
347 other: &Self,
348 op_id: PyComparisonOp,
349 vm: &VirtualMachine,
350 ) -> PyResult<bool> {
351 match self._cmp(other, op_id, vm)? {
352 Either::A(obj) => obj.try_to_bool(vm),
353 Either::B(other) => Ok(other),
354 }
355 }
356
357 pub fn repr_utf8(&self, vm: &VirtualMachine) -> PyResult<PyRef<PyUtf8Str>> {
358 self.repr(vm)?.try_into_utf8(vm)

Callers 15

bisect_leftFunction · 0.80
bisect_rightFunction · 0.80
__contains__Method · 0.80
calc_packageFunction · 0.80
check_matchedFunction · 0.80
min_or_maxFunction · 0.80
seekMethod · 0.80
cmpMethod · 0.80
dedup_and_flatten_argsFunction · 0.80
cmpMethod · 0.80
cmpMethod · 0.80

Calls 2

try_to_boolMethod · 0.80
_cmpMethod · 0.45

Tested by

no test coverage detected