mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-22 23:01:41 +03:00
[python] == doesn't coerce types; use bool() to demonstrate truthiness instead. Closes #418.
This commit is contained in:
parent
77facdeafe
commit
1e60055977
@ -105,8 +105,8 @@ None is None #=> True
|
||||
|
||||
# None, 0, and empty strings/lists all evaluate to False.
|
||||
# All other values are True
|
||||
0 == False #=> True
|
||||
"" == False #=> True
|
||||
bool(0) #=> False
|
||||
bool("") #=> False
|
||||
|
||||
|
||||
####################################################
|
||||
|
Loading…
Reference in New Issue
Block a user