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

Method missing_opt

crates/vm/src/builtins/dict.rs:624–632  ·  view source on GitHub ↗
(
        &self,
        key: &K,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

622 }
623
624 fn missing_opt<K: DictKey + ?Sized>(
625 &self,
626 key: &K,
627 vm: &VirtualMachine,
628 ) -> PyResult<Option<PyObjectRef>> {
629 vm.get_method(self.to_owned().into(), identifier!(vm, __missing__))
630 .map(|methods| methods?.call((key.to_pyobject(vm),), vm))
631 .transpose()
632 }
633
634 #[inline]
635 fn inner_getitem<K: DictKey + ?Sized>(

Callers 2

inner_getitemMethod · 0.80
get_item_optMethod · 0.80

Calls 5

mapMethod · 0.45
get_methodMethod · 0.45
to_ownedMethod · 0.45
callMethod · 0.45
to_pyobjectMethod · 0.45

Tested by

no test coverage detected