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:
Tim Peters 2003-01-28 01:03:10 +00:00
parent 518df0dae4
commit bd1cdb9227

View File

@ -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