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

Method new_from_str

crates/wasm/src/js_module.rs:111–113  ·  view source on GitHub ↗
(&self, s: PyStrRef)

Source from the content-addressed store, hash-verified

109
110 #[pymethod]
111 fn new_from_str(&self, s: PyStrRef) -> PyJsValue {
112 PyJsValue::new(s.expect_str())
113 }
114
115 #[pymethod]
116 fn new_from_float(&self, n: PyRef<PyFloat>) -> PyJsValue {

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
expect_strMethod · 0.80

Tested by

no test coverage detected