From: Tim Peters Date: Tue, 28 Jan 2003 01:03:10 +0000 (+0000) Subject: save_pers(): Switched the order of cases, to get rid of a "not", and to X-Git-Tag: v2.3c1~2263 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd1cdb9227c0736f7b0288520668ec56e1ca89c4;p=python 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). --- diff --git a/Lib/pickle.py b/Lib/pickle.py index daae16e7c5..80eaf0f1c3 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -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