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

Method build_bound_method

crates/vm/src/function/method.rs:186–197  ·  view source on GitHub ↗
(
        &'static self,
        ctx: &Context,
        obj: PyObjectRef,
        class: &'static Py<PyType>,
    )

Source from the content-addressed store, hash-verified

184 }
185
186 pub fn build_bound_method(
187 &'static self,
188 ctx: &Context,
189 obj: PyObjectRef,
190 class: &'static Py<PyType>,
191 ) -> PyRef<PyNativeMethod> {
192 PyRef::new_ref(
193 self.to_bound_method(obj, class),
194 ctx.types.builtin_function_or_method_type.to_owned(),
195 None,
196 )
197 }
198
199 pub fn build_classmethod(
200 &'static self,

Callers 2

extend_classMethod · 0.80
bindMethod · 0.80

Calls 2

to_bound_methodMethod · 0.80
to_ownedMethod · 0.45

Tested by

no test coverage detected