Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed1.swip.net!uio.no!nntp.uib.no!svn.schaathun.net!not-for-mail From: Hans Georg Schaathun Newsgroups: comp.lang.python Subject: Re: checking if a list is empty Date: Wed, 11 May 2011 19:15:59 +0100 Organization: University of Bergen Lines: 22 Message-ID: References: <9hYwp.5805$xo2.3333@newsfe07.iad> <4dc4b351$0$29991$c3e8da3$5496439d@news.astraweb.com> <4dca90c1$0$29980$c3e8da3$5496439d@news.astraweb.com> NNTP-Posting-Host: vannskorpion.bccs.uib.no X-Trace: toralf.uib.no 1305137052 92913 129.177.20.20 (11 May 2011 18:04:12 GMT) X-Complaints-To: abuse@uib.no NNTP-Posting-Date: 11 May 2011 18:04:12 GMT User-Agent: slrn/pre1.0.0-18 (Linux) Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5146 On Wed, 11 May 2011 13:50:54 -0400, Prasad, Ramit wrote: : I find this argument to be flawed. Should I stop using built-in : generators instead of range/xrange for looping through lists? : Certainly for loops with loop counting are understood more widely : than generators. Should I stop using any advanced feature Python : because it is difficult to understand without knowing Python? No; I'd suggest the most legible and intuitive construct that /does/ the job. Never something which requires one extra (illegible) page to do the job, or something which does not do the job at all. : I may not have made the point well, but I cannot see any advantage : for trying to program for the lowest common denominator. Common to what? I'd try the lowest common denominator of legibility and effictiveness. It is just KISS. -- :-- Hans Georg