Message from discussion
0 == False but [] != False?
Path: g2news1.google.com!news3.google.com!proxad.net!news.cs.univ-paris8.fr!ciril.fr!grolier!sn-xt-sjc-02!sn-xt-sjc-08!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail
From: Steven D'Aprano <st...@REMOVE.THIS.cybersource.com.au>
Newsgroups: comp.lang.python
Subject: Re: 0 == False but [] != False?
Date: Thu, 24 May 2007 20:51:02 +1000
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <pan.2007.05.24.10.50.56.763316@REMOVE.THIS.cybersource.com.au>
User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table)
References: <1179982400.412340.178710@g4g2000hsf.googlegroups.com> <1rda53hphn117k5scvcqrc7c2e37utfhgu@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@supernews.com
Lines: 12
On Thu, 24 May 2007 06:59:32 +0000, Tim Roberts wrote:
> As a general rule, I've found code like "if x == False" to be a bad idea in
> ANY language.
Surely that should be written as "if (x == False) == True"?
--
Steven.