Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'confuse': 0.09; 'logic': 0.09; 'objects.': 0.09; 'subject:while': 0.09; '"this': 0.13; '"if"': 0.16; 'false:': 0.16; 'namespace,': 0.16; 'object).': 0.16; 'suggesting': 0.16; 'wrote:': 0.17; 'statement': 0.23; 'idea': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'andrew': 0.27; '(including': 0.30; 'gets': 0.32; 'could': 0.32; 'print': 0.32; 'to:addr:python-list': 0.33; 'that,': 0.34; 'consistent': 0.35; 'false': 0.35; 'tool': 0.36; 'but': 0.36; 'anything': 0.36; 'test': 0.36; 'should': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'received:204': 0.72; 'truth': 0.75 Date: Tue, 17 Jul 2012 14:43:11 +0200 From: Laszlo Nagy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Implicit conversion to boolean in if and while statements References: <5002a1f9$0$29995$c3e8da3$5496439d@news.astraweb.com> <50037eab$0$29995$c3e8da3$5496439d@news.astraweb.com> <50047A84.6020208@gmail.com> <5004b543$0$29978$c3e8da3$5496439d@news.astraweb.com> <5004ec84$0$11116$c3e8da3@news.astraweb.com> <50050f70$0$30002$c3e8da3$5496439d@news.astraweb.com> <500520FF.3010305@gmail.com> In-Reply-To: <500520FF.3010305@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1342529001 news.xs4all.nl 6847 [2001:888:2000:d::a6]:34124 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25494 On 2012-07-17 10:23, Andrew Berg wrote: > I don't want that, but I am suggesting that it would be consistent with > the idea of "something or nothing". Don't confuse names and objects. You can only test the truth value of objects. If you don't have a name in a namespace, then it means you don't have a tool to have a reference to anything (including the False object). Using the same logic you could also say that not giving any condition to the "if" statement should be evaluated as False: if: print "This never gets executed" But it makes no sense.