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

Method get_method

crates/vm/src/vm/mod.rs:1981–1988  ·  view source on GitHub ↗

TODO: remove + transfer over to get_special_method

(
        &self,
        obj: PyObjectRef,
        method_name: &'static PyStrInterned,
    )

Source from the content-addressed store, hash-verified

1979
1980 // TODO: remove + transfer over to get_special_method
1981 pub(crate) fn get_method(
1982 &self,
1983 obj: PyObjectRef,
1984 method_name: &'static PyStrInterned,
1985 ) -> Option<PyResult> {
1986 let method = obj.get_class_attr(method_name)?;
1987 Some(self.call_if_get_descriptor(&method, obj))
1988 }
1989
1990 pub(crate) fn get_str_method(&self, obj: PyObjectRef, method_name: &str) -> Option<PyResult> {
1991 let method_name = self.ctx.interned_str(method_name)?;

Callers 14

get_awaitable_iterFunction · 0.45
execute_instructionMethod · 0.45
iterate_mapping_keysMethod · 0.45
_path_splitroot_exFunction · 0.45
_path_normpathFunction · 0.45
reversedFunction · 0.45
__add__Method · 0.45
missing_optMethod · 0.45
slot_newMethod · 0.45
get_awaitable_iterMethod · 0.45
try_complexMethod · 0.45
slot_newMethod · 0.45

Calls 3

get_class_attrMethod · 0.80
SomeClass · 0.50

Tested by

no test coverage detected