Issue #11875: Alter the previous fix to work better with subclasses
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py
index 32c2e80..bb10352 100644
--- a/Lib/collections/__init__.py
+++ b/Lib/collections/__init__.py
@@ -156,7 +156,7 @@
'Return state information for pickling'
items = [[k, self[k]] for k in self]
inst_dict = vars(self).copy()
- for k in vars(self.__class__()):
+ for k in vars(OrderedDict()):
inst_dict.pop(k, None)
if inst_dict:
return (self.__class__, (items,), inst_dict)