]> granicus.if.org Git - python/commitdiff
save_pers(): Switched the order of cases, to get rid of a "not", and to
authorTim Peters <tim.peters@gmail.com>
Tue, 28 Jan 2003 01:03:10 +0000 (01:03 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 28 Jan 2003 01:03:10 +0000 (01:03 +0000)
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

index daae16e7c5cfdcd96d8cf96cf182395dab0bef39..80eaf0f1c3d9a67accb4ecf3c3ff94a25fc1ec44 100644 (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