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

Method call_special_method

crates/vm/src/vm/vm_object.rs:177–186  ·  view source on GitHub ↗
(
        &self,
        obj: &PyObject,
        method: &'static PyStrInterned,
        args: impl IntoFuncArgs,
    )

Source from the content-addressed store, hash-verified

175 /// NOT PUBLIC API
176 #[doc(hidden)]
177 pub fn call_special_method(
178 &self,
179 obj: &PyObject,
180 method: &'static PyStrInterned,
181 args: impl IntoFuncArgs,
182 ) -> PyResult {
183 self.get_special_method(obj, method)?
184 .ok_or_else(|| self.new_attribute_error(method.as_str().to_owned()))?
185 .invoke(args, self)
186 }
187
188 /// Same as __builtins__.print in Python.
189 /// A convenience function to provide a simple way to print objects for debug purpose.

Callers 15

execute_instructionMethod · 0.80
get_awaitable_iterMethod · 0.80
len_wrapperFunction · 0.80
contains_wrapperFunction · 0.80
getitem_wrapperFunction · 0.80
setitem_wrapperFunction · 0.80
sequence_repeat_wrapperFunction · 0.80
repr_wrapperFunction · 0.80
str_wrapperFunction · 0.80
hash_wrapperFunction · 0.80

Calls 5

ok_or_elseMethod · 0.80
get_special_methodMethod · 0.80
invokeMethod · 0.45
to_ownedMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected