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

Function exact_float_from_obj

crates/vm/src/frame.rs:1129–1131  ·  view source on GitHub ↗
(obj: &PyObject, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1127
1128#[inline]
1129fn exact_float_from_obj(obj: &PyObject, vm: &VirtualMachine) -> Option<f64> {
1130 obj.downcast_ref_if_exact::<PyFloat>(vm).map(|f| f.to_f64())
1131}
1132
1133#[inline]
1134fn specialization_nonnegative_compact_index(i: &PyInt, vm: &VirtualMachine) -> Option<usize> {

Callers 3

float_compactlong_guardFunction · 0.85
compactlong_float_guardFunction · 0.85

Calls 2

to_f64Method · 0.80
mapMethod · 0.45

Tested by

no test coverage detected