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

Function populate_repr

crates/vm/src/stdlib/_ast/pyast.rs:1825–1835  ·  view source on GitHub ↗
(_vm: &VirtualMachine, module: &Py<PyModule>)

Source from the content-addressed store, hash-verified

1823}
1824
1825fn populate_repr(_vm: &VirtualMachine, module: &Py<PyModule>) {
1826 for (_name, value) in &module.dict() {
1827 let Some(type_obj) = value.downcast_ref::<PyType>() else {
1828 continue;
1829 };
1830 type_obj
1831 .slots
1832 .repr
1833 .store(Some(super::python::_ast::ast_repr));
1834 }
1835}

Callers 1

extend_module_nodesFunction · 0.85

Calls 3

SomeClass · 0.50
dictMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected