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

Method call

crates/vm/src/builtins/builtin_func.rs:72–81  ·  view source on GitHub ↗
(zelf: &Py<Self>, mut args: FuncArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

70 type Args = FuncArgs;
71 #[inline]
72 fn call(zelf: &Py<Self>, mut args: FuncArgs, vm: &VirtualMachine) -> PyResult {
73 if let Some(z) = &zelf.zelf {
74 // STATIC methods store the class in zelf for qualname/repr purposes,
75 // but should not prepend it to args (the Rust function doesn't expect it).
76 if !zelf.value.flags.contains(PyMethodFlags::STATIC) {
77 args.prepend_arg(z.clone());
78 }
79 }
80 (zelf.value.func)(vm, args)
81 }
82}
83
84// meth_richcompare in CPython

Callers

nothing calls this directly

Calls 3

prepend_argMethod · 0.80
containsMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected