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

Method get_attr_inner

crates/vm/src/protocol/object.rs:137–143  ·  view source on GitHub ↗
(&self, attr_name: &Py<PyStr>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

135 #[cfg_attr(feature = "flame-it", flame("PyObjectRef"))]
136 #[inline]
137 pub(crate) fn get_attr_inner(&self, attr_name: &Py<PyStr>, vm: &VirtualMachine) -> PyResult {
138 vm_trace!("object.__getattribute__: {:?} {:?}", self, attr_name);
139 let getattro = self.class().slots.getattro.load().unwrap();
140 getattro(self, attr_name, vm).inspect_err(|exc| {
141 vm.set_attribute_error_context(exc, self.to_owned(), attr_name.to_owned());
142 })
143 }
144
145 pub fn call_set_attr(
146 &self,

Callers 2

get_attrMethod · 0.80
get_attribute_optMethod · 0.80

Calls 5

unwrapMethod · 0.45
loadMethod · 0.45
classMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected