Skip to content
3 changes: 1 addition & 2 deletions Lib/_weakrefset.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ def __contains__(self, item):
return wr in self.data

def __reduce__(self):
return (self.__class__, (list(self),),
getattr(self, '__dict__', None))
return self.__class__, (list(self),), self.__getstate__()

def add(self, item):
if self._pending_removals:
Expand Down
Loading