diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-01-28 01:03:10 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-01-28 01:03:10 (GMT) |
commit | bd1cdb9227c0736f7b0288520668ec56e1ca89c4 (patch) | |
tree | 3364bd6d85228a50172ad14aadfa0720aa8cab45 /Lib/pickle.py | |
parent | 518df0dae473922397fa1bc3315d3576df9469f7 (diff) | |
download | cpython-bd1cdb9227c0736f7b0288520668ec56e1ca89c4.zip cpython-bd1cdb9227c0736f7b0288520668ec56e1ca89c4.tar.gz cpython-bd1cdb9227c0736f7b0288520668ec56e1ca89c4.tar.bz2 |
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).
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r-- | Lib/pickle.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index daae16e..80eaf0f 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 |