mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
save_bool(): simplified.
This commit is contained in:
parent
cbd0a32d09
commit
22987e3cbd
1 changed files with 1 additions and 4 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue