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

Method __init_dict_from_def

crates/vm/src/builtins/module.rs:130–133  ·  view source on GitHub ↗
(vm: &VirtualMachine, module: &Py<Self>)

Source from the content-addressed store, hash-verified

128 }
129
130 pub fn __init_dict_from_def(vm: &VirtualMachine, module: &Py<Self>) {
131 let doc = module.def.unwrap().doc.map(|doc| doc.to_owned());
132 module.init_dict(module.name.unwrap(), doc, vm);
133 }
134}
135
136impl Py<PyModule> {

Callers

nothing calls this directly

Calls 4

init_dictMethod · 0.80
mapMethod · 0.45
unwrapMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected