From bd1cdb9227c0736f7b0288520668ec56e1ca89c4 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Tue, 28 Jan 2003 01:03:10 +0000 Subject: [PATCH] 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). --- Lib/pickle.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/pickle.py b/Lib/pickle.py index daae16e7c5c..80eaf0f1c3d 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