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

Method to_object

crates/vm/src/builtins/mappingproxy.rs:136–143  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

134 }
135
136 fn to_object(&self, vm: &VirtualMachine) -> PyResult {
137 Ok(match &self.mapping {
138 MappingProxyInner::Mapping(d) => d.as_ref().to_owned(),
139 MappingProxyInner::Class(c) => {
140 PyDict::from_attributes(c.attributes.read().clone(), vm)?.to_pyobject(vm)
141 }
142 })
143 }
144
145 #[pymethod]
146 pub fn items(&self, vm: &VirtualMachine) -> PyResult {

Callers 15

ast_to_objectMethod · 0.45
ast_to_objectMethod · 0.45
init_dictMethod · 0.45
getMethod · 0.45
itemsMethod · 0.45
keysMethod · 0.45
valuesMethod · 0.45
__len__Method · 0.45
__reversed__Method · 0.45
cmpMethod · 0.45
hashMethod · 0.45
iterMethod · 0.45

Calls 5

to_ownedMethod · 0.45
as_refMethod · 0.45
to_pyobjectMethod · 0.45
cloneMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected