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

Method new_from_float

crates/wasm/src/js_module.rs:116–118  ·  view source on GitHub ↗
(&self, n: PyRef<PyFloat>)

Source from the content-addressed store, hash-verified

114
115 #[pymethod]
116 fn new_from_float(&self, n: PyRef<PyFloat>) -> PyJsValue {
117 PyJsValue::new(n.to_f64())
118 }
119
120 #[pymethod]
121 fn new_closure(&self, obj: PyObjectRef, vm: &VirtualMachine) -> PyResult<JsClosure> {

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
to_f64Method · 0.80

Tested by

no test coverage detected