Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'explicitly': 0.04; 'cpython': 0.05; 'exist,': 0.07; 'objects,': 0.07; 'received:209.85.160.174': 0.07; 'behavior,': 0.09; 'subject:while': 0.09; 'suggesting': 0.16; 'wrote:': 0.17; 'windows': 0.19; 'idea': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; "doesn't": 0.28; 'behaviour': 0.29; 'coded': 0.29; "d'aprano": 0.29; 'steven': 0.29; 'to:addr:python-list': 0.33; 'that,': 0.34; 'received:google.com': 0.34; 'consistent': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'message-id:@gmail.com': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'header:Received:5': 0.40; 'skip:6 10': 0.63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=Yrxpfwd8AddqLoiY6H9J8OUG+KFsSwv+eeZtywElcs0=; b=ka2tP80N72FgcfZn8YHK0yBz7SuzH/20DORxp8cdAoW+RAzztp9xAVTVeKOqx3HI+r mJYkaru8uxjtEFGjN1P+jrop8ijVg7i88M7fErdWMGg/WxbpkjaCTumgscvJaKsXydDA yQURuinhHgwxvCzCEoO5DHSGCKlRaNSsvMVaXMLtfZdXCM2wWuIlg5X6u0i0Hg8aTMMz B8hbo/zKfaAycKcgH4j/fxMn3lf6Tv8OVUuScHTLKA111+3Y6l009ls8tDBpcz9uh+V0 MGPyRukBWbTV3o2g4tu6U6oYe8JnwVa9iEj0TMfR5gIlKbEVCFWSca/ACsWyO+9t7O1P LZVA== Date: Tue, 17 Jul 2012 03:23:27 -0500 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: "comp.lang.python" 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> In-Reply-To: <50050f70$0$30002$c3e8da3$5496439d@news.astraweb.com> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=UTF-8 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1342513415 news.xs4all.nl 6986 [2001:888:2000:d::a6]:54314 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25470 On 7/17/2012 2:08 AM, Steven D'Aprano wrote: > The default behaviour is that every object is something, hence true-like, > unless explicitly coded to be treated as false-like. Since both loggers > and functions are objects, they are true-like unless the default is > overridden. I am aware of the default behavior, but the reason for it still eludes me. > Are you suggesting that if x doesn't exist, you want this behaviour? I don't want that, but I am suggesting that it would be consistent with the idea of "something or nothing". -- CPython 3.3.0b1 | Windows NT 6.1.7601.17803