mirror of
https://github.com/python/cpython.git
synced 2024-11-27 03:45:08 +08:00
save_pers(): Switched the order of cases, to get rid of a "not", and to
make the bin-vs-not-bin order consistent with what other routines try to do (they almost all handle the bin case first).
This commit is contained in:
parent
518df0dae4
commit
bd1cdb9227
@ -330,11 +330,11 @@ class Pickler:
|
||||
return None
|
||||
|
||||
def save_pers(self, pid):
|
||||
if not self.bin:
|
||||
self.write(PERSID + str(pid) + '\n')
|
||||
else:
|
||||
if self.bin:
|
||||
self.save(pid)
|
||||
self.write(BINPERSID)
|
||||
else:
|
||||
self.write(PERSID + str(pid) + '\n')
|
||||
|
||||
def save_reduce(self, acallable, arg_tup, state = None):
|
||||
write = self.write
|
||||
|
Loading…
Reference in New Issue
Block a user