This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients mjuric, rhettinger
Date 2011-04-19.09:34:04
SpamBayes Score 0.0051657255
Marked as misclassified No
Message-id <1303205646.54.0.915409424324.issue11875@psf.upfronthosting.co.za>
In-reply-to
Content
To avoid hardcoding the mangled names:

@@ -155,10 +155,9 @@
     def __reduce__(self):
         'Return state information for pickling'
         items = [[k, self[k]] for k in self]
-        tmp = self.__map, self.__root, self.__hardroot
-        del self.__map, self.__root, self.__hardroot
         inst_dict = vars(self).copy()
-        self.__map, self.__root, self.__hardroot = tmp
+        for k in vars(OrderedDict()):
+            inst_dict.pop(k, None)
         if inst_dict:
             return (self.__class__, (items,), inst_dict)
         return self.__class__, (items,)
History
Date User Action Args
2011-04-19 09:34:06rhettingersetrecipients: + rhettinger, mjuric
2011-04-19 09:34:06rhettingersetmessageid: <1303205646.54.0.915409424324.issue11875@psf.upfronthosting.co.za>
2011-04-19 09:34:04rhettingerlinkissue11875 messages
2011-04-19 09:34:04rhettingercreate