From: Raymond Hettinger Date: Wed, 20 Apr 2011 00:17:23 +0000 (-0700) Subject: Issue #11875: Alter the previous fix to work better with subclasses X-Git-Tag: v3.2.1b1~100^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d07eaf177c7d43a2479c1eb1fbab55e26e3822fa;p=python Issue #11875: Alter the previous fix to work better with subclasses --- diff --git a/Lib/collections.py b/Lib/collections.py index 5ae590763b..79912ecba1 100644 --- a/Lib/collections.py +++ b/Lib/collections.py @@ -102,7 +102,7 @@ class OrderedDict(dict): '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)