Skip to content
Prev Previous commit
Next Next commit
remove reduce_ex for now
  • Loading branch information
dannasman committed Oct 18, 2022
commit 33de7b7bcfe30e33c71fa92c1bbd16dd06cc64bd
20 changes: 0 additions & 20 deletions vm/src/stdlib/itertools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,6 @@ mod decl {
None => Ok(vm.new_tuple((cls, vm.ctx.empty_tuple.clone()))),
}
}

#[pymethod(magic)]
fn reduce_ex(
zelf: PyRef<Self>,
_proto: usize,
vm: &VirtualMachine,
) -> PyResult<PyTupleRef> {
let source = zelf.source.read().clone();
let active = zelf.active.read().clone();
let cls = zelf.class().to_owned();
match source {
Some(source) => match active {
Some(active) => {
Ok(vm.new_tuple((cls, vm.ctx.empty_tuple.clone(), ((source, active)))))
}
None => Ok(vm.new_tuple((cls, vm.ctx.empty_tuple.clone(), (source,)))),
},
None => Ok(vm.new_tuple((cls, vm.ctx.empty_tuple.clone()))),
}
}
}
impl IterNextIterable for PyItertoolsChain {}
impl IterNext for PyItertoolsChain {
Expand Down