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

Method get_attr

crates/vm/src/builtins/module.rs:274–277  ·  view source on GitHub ↗
(&self, attr_name: impl AsPyStr<'a>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

272 }
273
274 pub fn get_attr<'a>(&self, attr_name: impl AsPyStr<'a>, vm: &VirtualMachine) -> PyResult {
275 let attr_name = attr_name.as_pystr(&vm.ctx);
276 self.getattr_inner(attr_name, vm)
277 }
278
279 pub fn set_attr<'a>(
280 &self,

Callers 4

__dir__Method · 0.45
is_initializingMethod · 0.45
reprMethod · 0.45

Calls 2

as_pystrMethod · 0.80
getattr_innerMethod · 0.80

Tested by

no test coverage detected