Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f48ac30

Browse files
committed
Issue #11875: Alter the previous fix to work better with subclasses
2 parents 2d70e29 + 25458f1 commit f48ac30

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/collections/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def __reduce__(self):
156156
'Return state information for pickling'
157157
items = [[k, self[k]] for k in self]
158158
inst_dict = vars(self).copy()
159-
for k in vars(self.__class__()):
159+
for k in vars(OrderedDict()):
160160
inst_dict.pop(k, None)
161161
if inst_dict:
162162
return (self.__class__, (items,), inst_dict)

0 commit comments

Comments
 (0)