Raymond Hettinger <raymond.hettin...@gmail.com> added the comment: 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,) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11875> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com