[python3/en] Add examples to Bool operators with ints (#2639)

This commit is contained in:
ghostduck 2017-01-28 17:38:26 +08:00 committed by ven
parent 20b2a9a29d
commit 05e4c41cb3

View File

@ -71,11 +71,14 @@ True and False # => False
False or True # => True
# Note using Bool operators with ints
# False is 0 and True is 1
# Don't mix up with bool(ints) and bitwise and/or (&,|)
0 and 2 # => 0
-5 or 0 # => -5
0 == False # => True
2 == True # => False
1 == True # => True
-5 != False != True #=> True
# Equality is ==
1 == 1 # => True