feat: itertools.compress.__reduce__

This commit is contained in:
Alexander Scharinger committed 2022-06-16 11:36:31 +02:00
1 parent 81d2df806a
commit dbdbdc887f
1 file changed
+6 -1
+6 -1
View File
@@ -142,7 +142,12 @@ mod decl {
}
#[pyimpl(with(IterNext, Constructor))]
impl PyItertoolsCompress {}
impl PyItertoolsCompress {
#[pymethod(magic)]
fn reduce(zelf: PyRef<Self>) -> (PyTypeRef, (PyIter, PyIter)) {
(zelf.class().clone(), (zelf.data.clone(), zelf.selectors.clone()))
}
}
impl IterNextIterable for PyItertoolsCompress {}
impl IterNext for PyItertoolsCompress {