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

Function intern

crates/vm/src/stdlib/sys.rs:1316–1318  ·  view source on GitHub ↗
(s: PyRefExact<PyStr>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1314
1315 #[pyfunction]
1316 fn intern(s: PyRefExact<PyStr>, vm: &VirtualMachine) -> PyRef<PyStr> {
1317 vm.ctx.intern_str(s).to_owned()
1318 }
1319
1320 #[pyattr]
1321 fn int_info(vm: &VirtualMachine) -> PyTupleRef {

Callers 2

load_buildMethod · 0.85
_parse_ns_nameFunction · 0.85

Calls 2

intern_strMethod · 0.80
to_ownedMethod · 0.45

Tested by

no test coverage detected