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

Method get_or_create

crates/vm/src/frame.rs:515–518  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

513 /// Get the locals mapping, creating it lazily if needed.
514 #[inline]
515 pub fn get_or_create(&self, vm: &VirtualMachine) -> &ArgMapping {
516 self.inner
517 .get_or_init(|| ArgMapping::from_dict_exact(vm.ctx.new_dict()))
518 }
519
520 /// Get the locals mapping if already created.
521 #[inline]

Callers 3

mappingMethod · 0.80
clone_mappingMethod · 0.80
as_objectMethod · 0.80

Calls 2

new_dictMethod · 0.80
get_or_initMethod · 0.45

Tested by

no test coverage detected