summaryrefslogtreecommitdiffstats
path: root/Lib/pickle.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-01-28 00:26:14 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-01-28 00:26:14 (GMT)
commit22987e3cbdc577aed4290971c08327fa3ab74ae9 (patch)
tree5139cb3d99fa518262a6b8a9961620089e9973e7 /Lib/pickle.py
parentcbd0a32d09a71efe14f9834bb20dc5b12852e44e (diff)
downloadcpython-22987e3cbdc577aed4290971c08327fa3ab74ae9.zip
cpython-22987e3cbdc577aed4290971c08327fa3ab74ae9.tar.gz
cpython-22987e3cbdc577aed4290971c08327fa3ab74ae9.tar.bz2
save_bool(): simplified.
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r--Lib/pickle.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py
index 4e75416..1f551d6 100644
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -358,10 +358,7 @@ class Pickler:
dispatch[NoneType] = save_none
def save_bool(self, object):
- if object:
- self.write(TRUE)
- else:
- self.write(FALSE)
+ self.write(object and TRUE or FALSE)
dispatch[bool] = save_bool
def save_int(self, object):