Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: itertools.compress.__reduce__
  • Loading branch information
rng-dynamics committed Jun 16, 2022
commit dbdbdc887f26f1fd1aef130afed8f47d0a2ef34e
7 changes: 6 additions & 1 deletion vm/src/stdlib/itertools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down