Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.01; 'python.': 0.05; 'extreme': 0.05; 'remind': 0.05; 'python': 0.07; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:gator410.hostgator.com': 0.09; 'worse': 0.09; '~ethan~': 0.09; '>>>': 0.12; 'wrote:': 0.14; 'be?': 0.16; 'block,': 0.16; 'operator.': 0.16; 'reversed': 0.16; 'language,': 0.18; 'language': 0.20; 'subject:list': 0.22; 'header:In-Reply-To:1': 0.22; 'exist,': 0.23; 'that?': 0.23; 'works.': 0.23; 'typically': 0.24; "doesn't": 0.28; 'list': 0.30; 'does': 0.31; 'to:addr :python-list': 0.32; 'thinking': 0.33; "isn't": 0.34; 'received:70': 0.34; 'header:User-Agent:1': 0.35; 'point': 0.35; 'implies': 0.35; 'think': 0.36; 'considered': 0.36; 'some': 0.37; 'case': 0.37; 'should': 0.37; 'steven': 0.38; 'but': 0.38; 'to:addr:python.org': 0.39; 'could': 0.39; 'how': 0.39; 'would': 0.40; 'header:Received:5': 0.40; 'learn': 0.60; 'received:hostgator.com': 0.64; 'more...': 0.68; 'lost': 0.71; 'received:websitewelcome.com': 0.71; 'hate': 0.73; "'not'": 0.84; 'are...': 0.84; 'place?': 0.84; 'sort.': 0.91; 'you...': 0.95 Date: Sat, 07 May 2011 21:57:13 -0700 From: Ethan Furman User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: python-list@python.org Subject: Re: checking if a list is empty References: <9hYwp.5805$xo2.3333@newsfe07.iad> <4dc502c7$0$29991$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-Source: X-Source-Args: X-Source-Dir: 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: 30 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1304830690 news.xs4all.nl 81474 [::ffff:82.94.164.166]:49252 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:4939 harrismh777 wrote: > Steven D'Aprano wrote: >>> attribution lost wrote: >>> > and implies in any case that li does not exist >> It does nothing of the sort. If li doesn't exist, you get a NameError. > > That was the point. 'not' implies something that is not logical; > which is irony extreme since 'not' is typically considered a logical > operator. What does it mean to say not ? Well, apparently > it means the list is 'empty'... but why should it mean that? Why not > have it mean the list has been reversed in place? Why not have it mean > that the list isn't homogeneous? Why not have it mean that its not > mutable? I could think of more... Why should 'not' mean 'empty'? Because this is Python, and in Python that's what it means. > >>> > or worse is some kind of boolean. >> Only if you're still thinking in some language that isn't Python. > > Which most of us are... hate to remind you... Python is the new kid > on the block, and most of us are coming at this from multiple filters in > comp sci experience. Its just the truth. And your point would be? If you're going to use a language, and use it well, you have to learn how that language works. ~Ethan~