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

Method extend_methods

crates/vm/src/builtins/type.rs:1280–1285  ·  view source on GitHub ↗
(&'static self, method_defs: &'static [PyMethodDef], ctx: &Context)

Source from the content-addressed store, hash-verified

1278 }
1279
1280 pub fn extend_methods(&'static self, method_defs: &'static [PyMethodDef], ctx: &Context) {
1281 for method_def in method_defs {
1282 let method = method_def.to_proper_method(self, ctx);
1283 self.set_attr(ctx.intern_str(method_def.name), method);
1284 }
1285 }
1286}
1287
1288#[pyclass(

Callers 1

extend_classMethod · 0.80

Calls 3

to_proper_methodMethod · 0.80
intern_strMethod · 0.80
set_attrMethod · 0.45

Tested by

no test coverage detected