mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
feat: itertools.compress.__reduce__
This commit is contained in:
1 parent
81d2df806a
commit
dbdbdc887f
1 file changed
+6
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user