diff options
author | Raymond Hettinger <python@rcn.com> | 2011-04-20 00:19:11 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-04-20 00:19:11 (GMT) |
commit | f48ac3001af82ad6e1e4dba364982435ba9e7047 (patch) | |
tree | b25048c710ea8b56f126b0c245f5eced4771903e /Lib/collections | |
parent | 2d70e299985e59b626aedec6d803fc051b863f0c (diff) | |
parent | 25458f155a285c60e71e4966bb1b1f6fdfaf7bb1 (diff) | |
download | cpython-f48ac3001af82ad6e1e4dba364982435ba9e7047.zip cpython-f48ac3001af82ad6e1e4dba364982435ba9e7047.tar.gz cpython-f48ac3001af82ad6e1e4dba364982435ba9e7047.tar.bz2 |
Issue #11875: Alter the previous fix to work better with subclasses
Diffstat (limited to 'Lib/collections')
-rw-r--r-- | Lib/collections/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ 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) |