pub fn richcompare_mutating_seqs(
get_a: impl FnMut(usize) -> (usize, Option<PyObjectRef>),
get_b: impl FnMut(usize) -> (usize, Option<PyObjectRef>),
op: PyComparisonOp,
vm: &VirtualMachine,
) -> PyResult<bool>Expand description
Compare two sequences whose item-comparison callbacks may mutate the
containers. get(i) must snapshot (len, item_at_i) and drop any
container lock before returning.
After an unequal item, sizes are read again: if a callback shrank a
sequence so i is now past the end, the result is a length comparison
rather than the item inequality.