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

Method items

crates/stdlib/src/contextvars.rs:232–237  ·  view source on GitHub ↗
(zelf: PyRef<Self>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

230 // TODO: wrong return type
231 #[pymethod]
232 fn items(zelf: PyRef<Self>, vm: &VirtualMachine) -> Vec<PyObjectRef> {
233 let vars = zelf.borrow_vars();
234 vars.iter()
235 .map(|(k, v)| vm.ctx.new_tuple(vec![k.clone().into(), v.clone()]).into())
236 .collect()
237 }
238 }
239
240 impl Constructor for PyContext {

Callers 1

generate_tests.pyFile · 0.45

Calls 5

borrow_varsMethod · 0.80
collectMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45
new_tupleMethod · 0.45

Tested by

no test coverage detected