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

Method clear

crates/vm/src/builtins/dict.rs:51–57  ·  view source on GitHub ↗
(&mut self, out: &mut Vec<PyObjectRef>)

Source from the content-addressed store, hash-verified

49 }
50
51 fn clear(&mut self, out: &mut Vec<PyObjectRef>) {
52 // Pop all entries and collect both keys and values
53 for (key, value) in self.entries.drain_entries() {
54 out.push(key);
55 out.push(value);
56 }
57 }
58}
59
60impl fmt::Debug for PyDict {

Callers

nothing calls this directly

Calls 2

drain_entriesMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected