We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
To keep up-to-date with CPython's implementation for 3.10, we should add itertools.pairwise().
Looking at vm/src/stdlib/itertools.rs, it seems that we need something like
#[pyattr] #[pyclass(name = "pairwise")] #[derive(Debug)] struct PyItertoolsPairwise { ... } impl PyValue for PyItertoolsPairwise { fn class(_vm: &VirtualMachine) -> &PyTypeRef { Self::static_type() } } #[pyimpl(with(PyIter))] impl PyItertoolsPairwise { #[pyslot] fn tp_new( cls: PyTypeRef, iterable: PyObjectRef, vm: &VirtualMachine, ) -> PyResult<PyRef<Self>> { ... PyItertoolsPairwise { ... } .into_ref_with_type(vm, cls) } } impl PyIter for PyItertoolsPairwise { fn next(zelf: &PyRef<Self>, vm: &VirtualMachine) -> PyResult { ... } }
Summary
To keep up-to-date with CPython's implementation for 3.10, we should add itertools.pairwise().
Detailed Explanation
Looking at vm/src/stdlib/itertools.rs, it seems that we need something like