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

Method __reduce__

crates/vm/src/builtins/iter.rs:200–208  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

198
199 #[pymethod]
200 fn __reduce__(&self, vm: &VirtualMachine) -> PyTupleRef {
201 let func = builtins_iter(vm);
202 self.internal.lock().reduce(
203 func,
204 |x| x.clone(),
205 |vm| vm.ctx.empty_tuple.clone().into(),
206 vm,
207 )
208 }
209
210 #[pymethod]
211 fn __setstate__(&self, state: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {

Callers

nothing calls this directly

Calls 6

builtins_iterFunction · 0.85
reduceMethod · 0.45
lockMethod · 0.45
cloneMethod · 0.45
readMethod · 0.45
new_tupleMethod · 0.45

Tested by

no test coverage detected