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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '"if': 0.04; 'wed,': 0.04; 'completeness': 0.05; 'herein': 0.07; 'python?': 0.07; 'python': 0.07; 'counting': 0.09; 'generators': 0.09; 'message-----': 0.14; 'wrote:': 0.14; '712': 0.16; '>it': 0.16; 'affiliates,': 0.16; 'currencies': 0.16; 'generators.': 0.16; 'looping': 0.16; 'no;': 0.16; 'opened,': 0.16; 'received:155.180': 0.16; 'received:155.180.234': 0.16; 'received:159.53': 0.16; 'received:169.70': 0.16; 'received:169.70.190': 0.16; 'received:bankone.net': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:svr.bankone.net': 0.16; 'solicitation': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'what?': 0.16; 'argument': 0.16; 'wednesday,': 0.16; 'suggest': 0.19; 'fair': 0.19; 'to:2**1': 0.20; 'subject:list': 0.22; 'code': 0.22; 'header :In-Reply-To:1': 0.22; 'loop': 0.22; 'trying': 0.23; 'applicable,': 0.23; 'reflect': 0.24; 'received:169': 0.25; 'received:169.254': 0.25; 'instead': 0.26; 'url:mailman': 0.27; 'knowing': 0.29; 'checking': 0.29; 'certainly': 0.29; 'all.': 0.30; 'list': 0.30; 'do.': 0.31; 'chase': 0.31; 'construct': 0.31; 'received:155': 0.31; 'received:159': 0.31; 'received:169.254.1': 0.31; 'understands': 0.31; 'does': 0.31; 'it.': 0.31; 'format.': 0.31; 'to:addr:python-list': 0.32; 'thank': 0.32; 'url:listinfo': 0.33; '(including': 0.33; 'legally': 0.33; 'subject:': 0.33; 'page': 0.33; 'phone:': 0.33; '(for': 0.33; 'using': 0.34; 'change': 0.34; 'accepted': 0.35; 'requires': 0.35; 'purposes': 0.35; 'difficult': 0.35; 'point': 0.35; 'arising': 0.35; 'widely': 0.35; 'disclosure': 0.36; 'feature': 0.36; 'charset:us-ascii': 0.36; 'enough': 0.37; 'data': 0.37; 'refer': 0.37; 'should': 0.37; 'url:python': 0.37; 'skip:- 10': 0.37; 'accuracy': 0.38; 'but': 0.38; 'url:org': 0.38; 'sent:': 0.39; 'affect': 0.39; 'under': 0.39; 'comments': 0.39; 'common': 0.39; 'to:addr:python.org': 0.39; 'from:': 0.39; 'empty': 0.40; 'necessarily': 0.40; 'street': 0.40; 'contained': 0.40; 'might': 0.40; 'co.,': 0.60; 'learn': 0.60; 'job.': 0.60; 'transaction.': 0.60; 'virus': 0.61; 'subject': 0.61; 'you.': 0.61; '2011': 0.62; 'free': 0.62; 'market': 0.63; 'legal': 0.64; 'law.': 0.65; 'contact': 0.65; 'relating': 0.68; 'offer': 0.72; 'sale': 0.74; 'investment': 0.77; '11,': 0.77; 'bank': 0.78; 'purchase': 0.80; 'affiliates.': 0.84; 'defect': 0.84; 'prices,': 0.84; 'instrument': 0.95; 'notice.': 0.95 X-DKIM: Sendmail DKIM Filter v2.8.4 sz4.jpmchase.com p4BIxk4G023908 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=jpmchase.com; s=smtpout; t=1305140386; bh=XB7SbR+zxKN88hwGEyjQJqPwcWSDL3ahkFf9mqbz1n4=; h=From:To:Date:Subject:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=F8abQB0/O/kO5pBw4kEYbXv5dnIU4Ubyf9y3zyMc1JSprNLnxzTLzrbayNTHtHJ8j g9xxQZo8XtovxC9QkHPSKn4wP9vNrQ7L/obP9m+Aj9IRQV9pfSAxt8lQlpBIlTLrjc pLaTE9V3eL+ppHZi5PFc7pK70J1tCYhHLlhUXF1w= From: "Prasad, Ramit" To: "'Hans Georg Schaathun'" , "'python-list@python.org'" Date: Wed, 11 May 2011 14:59:34 -0400 Subject: RE: checking if a list is empty Thread-Topic: checking if a list is empty Thread-Index: AcwQC/hnApi2IbIlQ2uysNwQ7S1tLAAAQs4Q References: <9hYwp.5805$xo2.3333@newsfe07.iad> <4dc4b351$0$29991$c3e8da3$5496439d@news.astraweb.com> <4dca90c1$0$29980$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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: 48 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1305140393 news.xs4all.nl 34849 [::ffff:82.94.164.166]:41053 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5150 >Common to what? I'd try the lowest common denominator of=0D=0A>legibility= and effictiveness=2E=0D=0A>It is just KISS=2E=0D=0A=0D=0AFair enough=2E I = am a sheep, so I do what other (more knowledgeable) people do=2E It is a fa= ir assumption (for my specific code writing environments) that everyone who= is going to read my code understands "if x:" notation or is expected to le= arn enough Python to understand it=2E=0D=0A=0D=0A=0D=0A=0D=0A=0D=0ARamit=0D= =0A=0D=0A=0D=0A=0D=0ARamit Prasad | JPMorgan Chase Investment Bank | Curren= cies Technology=0D=0A712 Main Street | Houston, TX 77002=0D=0Awork phone: 7= 13 - 216 - 5423=0D=0A=0D=0A=0D=0A-----Original Message-----=0D=0AFrom: pyth= on-list-bounces+ramit=2Eprasad=3Djpmchase=2Ecom@python=2Eorg [mailto:python= -list-bounces+ramit=2Eprasad=3Djpmchase=2Ecom@python=2Eorg] On Behalf Of Ha= ns Georg Schaathun=0D=0ASent: Wednesday, May 11, 2011 1:16 PM=0D=0ATo: pyth= on-list@python=2Eorg=0D=0ASubject: Re: checking if a list is empty=0D=0A=0D= =0AOn Wed, 11 May 2011 13:50:54 -0400, Prasad, Ramit=0D=0A wrote:=0D=0A: I find this argument to be flawed=2E Should= I stop using built-in =0D=0A: generators instead of range/xrange for loopi= ng through lists?=0D=0A: Certainly for loops with loop counting are underst= ood more widely=0D=0A: than generators=2E Should I stop using any advanced = feature Python=0D=0A: because it is difficult to understand without knowing= Python?=0D=0A=0D=0ANo; I'd suggest the most legible and intuitive construc= t that /does/ the=0D=0Ajob=2E Never something which requires one extra (il= legible) page to do=0D=0Athe job, or something which does not do the job at= all=2E=0D=0A=0D=0A: I may not have made the point well, but I cannot see = any advantage =0D=0A: for trying to program for the lowest common denominat= or=2E=0D=0A=0D=0A-- =0D=0A:-- Hans Georg=0D=0A-- =0D=0Ahttp://mail=2Epython= =2Eorg/mailman/listinfo/python-list=0D=0AThis communication is for informat= ional purposes only=2E It is not=0Aintended as an offer or solicitation for= the purchase or sale of=0Aany financial instrument or as an official confi= rmation of any=0Atransaction=2E All market prices, data and other informati= on are not=0Awarranted as to completeness or accuracy and are subject to ch= ange=0Awithout notice=2E Any comments or statements made herein do not=0Ane= cessarily reflect those of JPMorgan Chase & Co=2E, its subsidiaries=0Aand a= ffiliates=2E=0D=0A=0D=0AThis transmission may contain information that is p= rivileged,=0Aconfidential, legally privileged, and/or exempt from disclosur= e=0Aunder applicable law=2E If you are not the intended recipient, you=0Aar= e hereby notified that any disclosure, copying, distribution, or=0Ause of t= he information contained herein (including any reliance=0Athereon) is STRIC= TLY PROHIBITED=2E Although this transmission and any=0Aattachments are beli= eved to be free of any virus or other defect=0Athat might affect any comput= er system into which it is received and=0Aopened, it is the responsibility = of the recipient to ensure that it=0Ais virus free and no responsibility is= accepted by JPMorgan Chase &=0ACo=2E, its subsidiaries and affiliates, as = applicable, for any loss=0Aor damage arising in any way from its use=2E If = you received this=0Atransmission in error, please immediately contact the s= ender and=0Adestroy the material in its entirety, whether in electronic or = hard=0Acopy format=2E Thank you=2E=0D=0A=0D=0APlease refer to http://www=2E= jpmorgan=2Ecom/pages/disclosures for=0Adisclosures relating to European leg= al entities=2E