diff --git a/Lib/collections.py b/Lib/collections.py index f26c73ed0f9..89a15886f83 100644 --- a/Lib/collections.py +++ b/Lib/collections.py @@ -539,6 +539,9 @@ def copy(self): 'Like dict.copy() but returns a Counter instance instead of a dict.' return Counter(self) + def __reduce__(self): + return self.__class__, (dict(self),) + def __delitem__(self, elem): 'Like dict.__delitem__() but does not raise KeyError for missing values.' if elem in self: