Skip to content

Commit 35621d3

Browse files
committed
Utils: fix recursion error on pickling
1 parent 298a099 commit 35621d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dill/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def discard(self, item):
4040
except ValueError:
4141
pass
4242
def __reduce__(self):
43-
return CheckerSet, (self.checker, iter(self))
43+
return CheckerSet, (self.checker, tuple(self))
4444

4545
class TransSet(set):
4646
"""transformer set that uses a constructor to modify added items"""
@@ -54,5 +54,5 @@ def discard(self, item):
5454
def remove(self, item):
5555
super().remove(self.constructor(item))
5656
def __reduce__(self):
57-
return TransSet, (self.constructor, iter(self))
57+
return TransSet, (self.constructor, tuple(self))
5858

0 commit comments

Comments
 (0)