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

Method lookup_ref

crates/vm/src/builtins/type.rs:1086–1089  ·  view source on GitHub ↗

_PyType_LookupRef: look up a name through the MRO without setting an exception.

(&self, name: &Py<PyStr>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1084
1085 /// _PyType_LookupRef: look up a name through the MRO without setting an exception.
1086 pub fn lookup_ref(&self, name: &Py<PyStr>, vm: &VirtualMachine) -> Option<PyObjectRef> {
1087 let interned_name = vm.ctx.interned_str(name)?;
1088 self.find_name_in_mro(interned_name)
1089 }
1090
1091 pub fn get_super_attr(&self, attr_name: &'static PyStrInterned) -> Option<PyObjectRef> {
1092 self.mro.read()[1..]

Callers 2

lookup_specialMethod · 0.80
get_dict_descriptorFunction · 0.80

Calls 2

interned_strMethod · 0.80
find_name_in_mroMethod · 0.80

Tested by

no test coverage detected