Commit b32a8317 authored by Tim Peters's avatar Tim Peters

save(): Fiddled the control flow to put the normal case where it

belongs.  This is a much smaller change than it may appear:  the bulk
of the function merely got unindented by one level.
parent c9d7c4a6
......@@ -270,6 +270,12 @@ class Pickler:
try:
f = self.dispatch[t]
except KeyError:
pass
else:
f(self, object)
return
# The dispatch table doesn't know about type t.
try:
issc = issubclass(t, TypeType)
except TypeError: # t is not a class
......@@ -322,9 +328,6 @@ class Pickler:
memo_len = len(memo)
self.write(self.put(memo_len))
memo[d] = (memo_len, object)
return
f(self, object)
def persistent_id(self, object):
return None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment