Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'something,': 0.07; 'received:81.103': 0.09; 'received:81.103.221': 0.09; 'received:81.103.221.35': 0.09; 'received:ispmail.ntl.com': 0.09; 'received:ntl.com': 0.09; 'am,': 0.14; 'wrote:': 0.14; '(until': 0.16; 'angelico': 0.16; 'from:addr:hobson42': 0.16; 'from:name:ian': 0.16; 'it).': 0.16; 'lucky,': 0.16; 'received:192.168.0.12': 0.16; 'received:aamtaout02-winn.ispmail.ntl.com': 0.16; 'reply- to:addr:hobson42': 0.16; 'subject:list': 0.19; 'header:In-Reply- To:1': 0.21; 'thu,': 0.22; 'items.': 0.23; 'forgot': 0.29; 'lists': 0.29; 'all,': 0.30; 'do.': 0.30; '"real': 0.30; 'exist.': 0.30; "didn't": 0.31; 'done,': 0.32; 'to:addr:python-list': 0.33; 'list': 0.33; 'list.': 0.33; 'chris': 0.34; 'header:User-Agent:1': 0.35; 'reference': 0.35; 'message-id:@gmail.com': 0.36; 'another': 0.37; 'put': 0.37; 'realize': 0.38; 'subject:: ': 0.38; 'received:192': 0.38; 'empty': 0.39; 'to:addr:python.org': 0.39; 'your': 0.60; 'back': 0.63; 'home': 0.69; 'header:Reply-To:1': 0.72; 'reply-to:no real name:2**0': 0.72; 'arrive': 0.73; 'claim': 0.76; 'reply-to:addr:gmail.com': 0.79; 'useful!': 0.84; 'shopping': 0.92 Date: Sun, 22 May 2011 10:20:00 +0100 From: Ian User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Mnenhy/0.8.3 Thunderbird/3.1.10 MIME-Version: 1.0 To: python-list@python.org Subject: Re: checking if a list is empty References: <9hYwp.5805$xo2.3333@newsfe07.iad> <4dc4b351$0$29991$c3e8da3$5496439d@news.astraweb.com> <4dca90c1$0$29980$c3e8da3$5496439d@news.astraweb.com> <4DCAF95B.60307@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=Py4kDrXLE7IA:10 a=vIQC1TJgd7IA:10 a=nDghuxUhq_wA:10 a=hcRjaz30x_AA:10 a=d3ZwFMNkyaEA:10 a=8nJEP1OIZ-IA:10 a=pGLkceISAAAA:8 a=2SpUJG0-oTMneQu-1ykA:9 a=wPNLvfGTeEIA:10 a=MSl-tDqOz04A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: hobson42@gmail.com 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: 23 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306056010 news.xs4all.nl 49044 [::ffff:82.94.164.166]:34248 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5970 On 12/05/2011 04:51, Chris Angelico wrote: > On Thu, May 12, 2011 at 7:02 AM, Ian wrote: >> In the "real world" lists of zero items do not exist. >> You don't go shopping with a shopping list of zero items. > Actually, yes you do. You maintain your shopping list between trips; > whenever you need something, you put it on the list immediately. Then > when you go shopping, you just take the list with you (if you're > lucky, you don't need to move or copy it at all, you just get another > reference to it). Once you're done, you empty the list - you now have > a shopping list with zero items (until you get home and realize you > forgot something). > > Chris Angelico He He. I didn't claim an empty list was not useful! If you maintain it between trips, then yes, you arrive back with an empty list. Ian