From 1e60055977dd82e6e69de43973e2481d93f78b64 Mon Sep 17 00:00:00 2001 From: Adam Brenecki Date: Tue, 26 Nov 2013 18:12:53 +1030 Subject: [python] == doesn't coerce types; use bool() to demonstrate truthiness instead. Closes #418. --- python.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python.html.markdown') 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 #################################################### -- cgit v1.2.3