File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,16 +98,6 @@ def __reversed__(self):
9898 yield curr .key
9999 curr = curr .prev
100100
101- def __reduce__ (self ):
102- 'Return state information for pickling'
103- items = [[k , self [k ]] for k in self ]
104- inst_dict = vars (self ).copy ()
105- for k in vars (OrderedDict ()):
106- inst_dict .pop (k , None )
107- if inst_dict :
108- return (self .__class__ , (items ,), inst_dict )
109- return self .__class__ , (items ,)
110-
111101 update = __update = MutableMapping .update
112102 keys = MutableMapping .keys
113103 values = MutableMapping .values
@@ -156,6 +146,16 @@ def __repr__(self):
156146 self .__in_repr = False
157147 return result
158148
149+ def __reduce__ (self ):
150+ 'Return state information for pickling'
151+ items = [[k , self [k ]] for k in self ]
152+ inst_dict = vars (self ).copy ()
153+ for k in vars (OrderedDict ()):
154+ inst_dict .pop (k , None )
155+ if inst_dict :
156+ return (self .__class__ , (items ,), inst_dict )
157+ return self .__class__ , (items ,)
158+
159159 def copy (self ):
160160 'od.copy() -> a shallow copy of od'
161161 return self .__class__ (self )
You can’t perform that action at this time.
0 commit comments