Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.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.077 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.00; 'something,': 0.07; 'am,': 0.14; 'wrote:': 0.14; '(until': 0.16; 'it).': 0.16; 'lucky,': 0.16; 'subject:list': 0.22; 'header:In-Reply-To:1': 0.22; 'thu,': 0.22; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'forgot': 0.29; 'list': 0.30; 'do.': 0.31; '"real': 0.31; 'exist.': 0.31; 'all,': 0.31; 'to:addr:python-list': 0.32; 'another': 0.32; 'done,': 0.33; 'reference': 0.34; 'put': 0.35; 'items.': 0.35; 'received:209.85': 0.37; 'received:google.com': 0.38; 'realize': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'empty': 0.40; 'header:Received:5': 0.40; '2011': 0.62; 'home': 0.67; 'received:209.85.210.174': 0.84; 'received:mail- iy0-f174.google.com': 0.84; 'shopping': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=rv98DxDtdE+dKguugO4l++VsA8nrPm+BIMPVGKbu3CY=; b=I4WfnCwGDRjycs17RUb/Cvs4iCjILo2lEoVg+XkqxnhHvTDfMpZxJ+xPWAH7nQj0lf SZ/1SARRcmITa2Qw2T4j2c4upsynJGehVwLgO/KkHuOCkAK9L+5RaqSaYxKmg2dsnSRq pggOWOCOfdu83UHQ9CcMpQUODHvQnZtQFbAzg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=MYHZ9CIVmXbfQpxbFMdedgDluJLAHQhSdU9UpF2ORqxI8rJLKdc7vjsxhCxoLoExEV QL2Nu24YfTTUxIlXWTDMjqAJ6/uPC/XBuO2BSKlc3pUAS9qTjHd+2xeFuqfDMBNv/zgU pICTCroGzwNYLo6VJ7azdZ/8ToY+q3d1fiEDE= MIME-Version: 1.0 In-Reply-To: <4DCAF95B.60307@gmail.com> 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> Date: Thu, 12 May 2011 13:51:12 +1000 Subject: Re: checking if a list is empty From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 13 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1305172276 news.xs4all.nl 34849 [::ffff:82.94.164.166]:34872 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5189 On Thu, May 12, 2011 at 7:02 AM, Ian wrote: > In the "real world" =A0lists 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