diff options
author | Adam Brenecki <adam@brenecki.id.au> | 2013-11-26 18:12:53 +1030 |
---|---|---|
committer | Adam Brenecki <adam@brenecki.id.au> | 2013-11-26 18:12:53 +1030 |
commit | 1e60055977dd82e6e69de43973e2481d93f78b64 (patch) | |
tree | 21cd329ea1fd491071144865721f201c306cbe2f | |
parent | 77facdeafe65b5e4c91e2e63c39e424da3c425b9 (diff) |
[python] == doesn't coerce types; use bool() to demonstrate truthiness instead. Closes #418.
-rw-r--r-- | python.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python.html.markdown b/python.html.markdown index 22d236ac..941ba9f4 100644 --- a/python.html.markdown +++ b/python.html.markdown @@ -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 #################################################### |