Skip to content

Commit 0f8148a

Browse files
committed
itertools.py zip_longest missing __reduce__ and __setstate__ builtins
1 parent 48e9e20 commit 0f8148a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

graalpython/lib-graalpython/itertools.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,15 @@ def __new__(subtype, iter1, *args, fillvalue=None):
777777
self.iterators = [iter(iter1)] + [iter(arg) for arg in args]
778778
return self
779779

780+
@__graalpython__.builtin_method
781+
def __reduce__(self):
782+
return type(self), tuple(self.iterators), self.fillvalue
783+
784+
785+
@__graalpython__.builtin_method
786+
def __setstate__(self, state):
787+
self.fillvalue = state
788+
780789

781790
class cycle():
782791
"""

0 commit comments

Comments
 (0)