Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'received:209.85.213.46': 0.07; 'received:mail-yw0-f46.google.com': 0.07; 'confuse': 0.09; 'pm,': 0.11; 'wrote:': 0.14; 'adam': 0.16; 'len(x)': 0.16; 'ignore': 0.16; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; 'cheers,': 0.20; 'subject:list': 0.22; 'header:In-Reply-To:1': 0.22; 'cc:addr:python-list': 0.22; 'received:209.85.213': 0.23; 'sfxlen:0': 0.23; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; "doesn't": 0.28; 'fri,': 0.29; 'fine.': 0.29; 'cc:addr:python.org': 0.31; 'equally': 0.31; 'received:209.85': 0.37; 'received:google.com': 0.38; 'current': 0.38; 'received:209': 0.39; 'works': 0.40; 'would': 0.40; 'header:Received:5': 0.40; '2011': 0.62; 'williams': 0.64 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=PUliyzHvgoSjwE3ianTpR/gE+VoxdJBEP9zNTph+8GQ=; b=C+CsG/dES/f2qlyaQ8/wgUNeeByapShrweLy5F/oOwhdK6lQ7sdZwBJdmUx30ZqQRd nWaHDVWR4m8dRoBNTCLhCCMyxvn0qFVtk+9+9Qx8FTLIoeiPUkEbTFW+l70ErqhbRllv LG4jakA9GtUIuLJyWoWCc/KX1BHbsab9Uchnw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=a+LpKWk4WCyRFDWZiU36BYhrrW1FgsqWuL40i0rgi9vFp37kpDLVUFbyFe+744FuEz /ns7nHlfz8vOPggQuUWLlfGpWDDdGKXfHgtNWjFVzj3XADB5sPll7skLAA89uHDxowYv GOpIiNkLFvuENYbmCo+mTuztfvVR2hTPIRNLA= MIME-Version: 1.0 Sender: chris@rebertia.com In-Reply-To: <1304712309.9905.10.camel@linux-yu4c.site> References: <9hYwp.5805$xo2.3333@newsfe07.iad> <1304712309.9905.10.camel@linux-yu4c.site> Date: Fri, 6 May 2011 13:46:14 -0700 X-Google-Sender-Auth: KiV1cfuD815E2DtFFyTTHjDE0Zc Subject: Re: checking if a list is empty From: Chris Rebert To: awilliam@whitemice.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org 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: 14 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1304714777 news.xs4all.nl 41103 [::ffff:82.94.164.166]:55702 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:4864 On Fri, May 6, 2011 at 1:05 PM, Adam Tauno Williams wrote: > - and ignore the Pythonistas [they're nuts; =C2=A0that x.count() doesn't = work > is amazingly stupid]. Eh? It works fine. [5, 2, 2, 1, 2].count(2) =3D=3D 3. If you mean you want len(x) to be spelled x.count(), that's equally stupid; `count` would be a lousy name (people would confuse it with what the current .count() does). `length` or `size` would make much more sense. Cheers, Chris