Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed1.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.030 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'modify': 0.07; 'back.': 0.09; '10:13': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'headers.': 0.16; 'iterating': 0.16; 'wait.': 0.16; 'index': 0.16; 'wrote:': 0.18; 'saying': 0.22; '31,': 0.24; 'question': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'boundary': 0.31; 'equality': 0.31; 'cases': 0.33; 'fri,': 0.33; 'received:209.85': 0.35; 'johnson': 0.35; 'operations': 0.35; 'received:google.com': 0.35; "he's": 0.36; 'sequence': 0.36; 'whilst': 0.36; 'received:209': 0.37; 'stopped': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; "you're": 0.61; 'name': 0.63; 'rick': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=G/a0Jwu/OV8XUwSCAbU1PTWuIBGixXfX0XaKyfCCF8I=; b=L3mOOplh8jYp7nkjxdapcP9WWWxEeTpru+QsIdTRX+iiGo5w42//PAQM0B20R7Rh0H qrZmnuUdhcMHFjVv8w580cg2vuJgJfXArUVa5in0fVY3Rul358t6DsJSgSlbqxMHVya+ WJg/h6tRLUIzTPULkOiSS9StgX9CVB5zGdx1ctQah5pcoUUbqfYHB4U80m8oYKje1SjE 64ESQsnPqiUm37MZ/1qNmQdFEOYamrb+UtR/XKu5awTxT1YED/rv9NFLxPQCpewslhSC chms44rdIilucyNsS7lUJ8YcaUOPA4OznxMpWBAfcS5+cE//ZjtaVywh7iWAWrmFsqz7 GzSg== MIME-Version: 1.0 X-Received: by 10.68.141.14 with SMTP id rk14mr10973994pbb.1.1369967366269; Thu, 30 May 2013 19:29:26 -0700 (PDT) In-Reply-To: <9e4d113b-23ec-4eb3-836a-fc80c505c846@googlegroups.com> References: <5f101d70-e51f-4531-9153-c92ee2486fd9@googlegroups.com> <51a1fc7b$0$30002$c3e8da3$5496439d@news.astraweb.com> <2abf4e9c-8c3b-4e2f-80c9-50c1f1d75c9d@googlegroups.com> <51a4b5a1$0$29966$c3e8da3$5496439d@news.astraweb.com> <04b90c02-833a-4bad-88ad-ab71178b8f79@googlegroups.com> <51a6df59$0$11118$c3e8da3@news.astraweb.com> <578a8e7f-4358-40ba-bcf8-d3a81b37c0d2@vy4g2000pbc.googlegroups.com> <9e4d113b-23ec-4eb3-836a-fc80c505c846@googlegroups.com> Date: Fri, 31 May 2013 12:29:26 +1000 Subject: Re: Short-circuit Logic From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 2001:888:2000:d::a6 X-Trace: 1369967856 news.xs4all.nl 15910 [2001:888:2000:d::a6]:46803 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46568 On Fri, May 31, 2013 at 10:13 AM, Rick Johnson wrote: > What if you need to perform operations on a sequence (more than once) in a non-linear fashion? What if you need to modify the sequence whilst looping? In many cases your simplistic "for loop" will fail miserably. What has this to do with the original question of iterating across integers? What you're now saying is that both the meaning of the current index and the top boundary can change during iteration; that's unrelated to whether to use equality or inequality for comparisons. Oh wait. Rick's back. He's been away so long that I stopped looking for his name in the headers. ChrisA