]> granicus.if.org Git - python/commitdiff
Use a generic class lookup.
authorRaymond Hettinger <python@rcn.com>
Tue, 19 Apr 2011 16:52:21 +0000 (09:52 -0700)
committerRaymond Hettinger <python@rcn.com>
Tue, 19 Apr 2011 16:52:21 +0000 (09:52 -0700)
Lib/collections.py

index 28a2abf44f8aada6743a09fb062431f94ff4e83b..83d928cf90cd644eac491798fc5d1e53ecbe5026 100644 (file)
@@ -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(OrderedDict()):
+        for k in vars(self.__class__()):
             inst_dict.pop(k, None)
         if inst_dict:
             return (self.__class__, (items,), inst_dict)