From: Raymond Hettinger Date: Tue, 19 Apr 2011 23:53:07 +0000 (-0700) Subject: Issue #11875: Alter the previous fix to work better with subclasses X-Git-Tag: v2.7.2rc1~134 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c98556e72e3850532fb0801af4f6ca83e920fa54;p=thirdparty%2FPython%2Fcpython.git Issue #11875: Alter the previous fix to work better with subclasses --- diff --git a/Lib/collections.py b/Lib/collections.py index 83d928cf90cd..28a2abf44f8a 100644 --- a/Lib/collections.py +++ b/Lib/collections.py @@ -116,7 +116,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)