[Python-checkins] cpython (2.7): Issue #11875: Alter the previous fix to work better with subclasses
raymond.hettinger
python-checkins at python.org
Wed Apr 20 02:01:11 CEST 2011
http://hg.python.org/cpython/rev/db66eaf353a6
changeset: 69459:db66eaf353a6
branch: 2.7
parent: 69452:08b5e2c9112c
user: Raymond Hettinger <python at rcn.com>
date: Tue Apr 19 16:53:07 2011 -0700
summary:
Issue #11875: Alter the previous fix to work better with subclasses
files:
Lib/collections.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/collections.py b/Lib/collections.py
--- a/Lib/collections.py
+++ b/Lib/collections.py
@@ -116,7 +116,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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list