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

Method get_chain_exact

crates/vm/src/builtins/dict.rs:772–781  ·  view source on GitHub ↗

Look up `key` in `self`, falling back to `other`. Both dicts must be exact `dict` types (enforced by `PyExact`).

(
        &self,
        other: &Self,
        key: &K,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

770 /// Look up `key` in `self`, falling back to `other`.
771 /// Both dicts must be exact `dict` types (enforced by `PyExact`).
772 pub(crate) fn get_chain_exact<K: DictKey + ?Sized>(
773 &self,
774 other: &Self,
775 key: &K,
776 vm: &VirtualMachine,
777 ) -> PyResult<Option<PyObjectRef>> {
778 debug_assert!(self.class().is(vm.ctx.types.dict_type));
779 debug_assert!(other.class().is(vm.ctx.types.dict_type));
780 self.entries.get_chain(&other.entries, vm, key)
781 }
782}
783
784// Implement IntoIterator so that we can easily iterate dictionaries from rust code.

Callers 2

get_chainMethod · 0.80

Calls 1

get_chainMethod · 0.45

Tested by

no test coverage detected