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

Method __setstate__

crates/vm/src/builtins/tuple.rs:651–655  ·  view source on GitHub ↗
(&self, state: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

649
650 #[pymethod]
651 fn __setstate__(&self, state: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
652 self.internal
653 .lock()
654 .set_state(state, |obj, pos| pos.min(obj.len()), vm)
655 }
656
657 #[pymethod]
658 fn __reduce__(&self, vm: &VirtualMachine) -> PyTupleRef {

Callers

nothing calls this directly

Calls 4

set_stateMethod · 0.80
lockMethod · 0.45
minMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected