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

Method call_if_get_descriptor

crates/vm/src/vm/vm_object.rs:125–128  ·  view source on GitHub ↗
(&self, attr: &PyObject, obj: PyObjectRef)

Source from the content-addressed store, hash-verified

123 }
124
125 pub fn call_if_get_descriptor(&self, attr: &PyObject, obj: PyObjectRef) -> PyResult {
126 self.call_get_descriptor(attr, obj)
127 .unwrap_or_else(|| Ok(attr.to_owned()))
128 }
129
130 #[inline]
131 pub fn call_method<T>(&self, obj: &PyObject, method_name: &str, args: T) -> PyResult

Callers 4

getattroMethod · 0.80
getattroMethod · 0.80
get_methodMethod · 0.80

Calls 2

call_get_descriptorMethod · 0.80
to_ownedMethod · 0.45

Tested by

no test coverage detected