summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Brenecki <adam@brenecki.id.au>2013-11-26 18:12:53 +1030
committerAdam Brenecki <adam@brenecki.id.au>2013-11-26 18:12:53 +1030
commit1e60055977dd82e6e69de43973e2481d93f78b64 (patch)
tree21cd329ea1fd491071144865721f201c306cbe2f
parent77facdeafe65b5e4c91e2e63c39e424da3c425b9 (diff)
[python] == doesn't coerce types; use bool() to demonstrate truthiness instead. Closes #418.
-rw-r--r--python.html.markdown4
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
####################################################