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

Function get_value

crates/vm/src/builtins/int.rs:784–786  ·  view source on GitHub ↗

Retrieve inner int value:

(obj: &PyObject)

Source from the content-addressed store, hash-verified

782
783// Retrieve inner int value:
784pub(crate) fn get_value(obj: &PyObject) -> &BigInt {
785 &obj.downcast_ref::<PyInt>().unwrap().value
786}
787
788pub fn try_to_float(int: &BigInt, vm: &VirtualMachine) -> PyResult<f64> {
789 bigint_to_finite_float(int)

Callers 5

serializeMethod · 0.50
bool_wrapperFunction · 0.50
pyobject_to_opt_usizeFunction · 0.50
get_jit_valueFunction · 0.50
test_add_py_integersFunction · 0.50

Calls 1

unwrapMethod · 0.45

Tested by 1

test_add_py_integersFunction · 0.40