Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Terry Reedy Newsgroups: comp.lang.python Subject: Re: "for/while ... break(by any means) ... else" make sense? Date: Wed, 29 Jun 2016 16:22:03 -0400 Lines: 56 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de bIHKaFVVkKq9aOJbSr2j1g/Awo1A2FbcTUYGA5pBNNlw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'else:': 0.03; 'clause': 0.07; 'executed': 0.07; 'false.': 0.07; 'repeated': 0.07; '*is*': 0.09; 'bindings': 0.09; 'formatted': 0.09; 'implemented.': 0.09; 'loop.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:while': 0.09; 'unpacking': 0.09; 'jan': 0.11; 'def': 0.13; 'properly': 0.15; 'assignment.': 0.16; 'assigns': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'recurse': 0.16; 'reedy': 0.16; 'subject:break': 0.16; 'subject:make': 0.16; 'wrote:': 0.16; 'language': 0.19; 'machine': 0.21; 'converted': 0.22; 'parameter': 0.22; 'terminate': 0.22; 'trying': 0.22; 'am,': 0.23; 'code.': 0.23; '(where': 0.23; 'needed.': 0.23; 'replacing': 0.23; 'implemented': 0.24; 'header :In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'command': 0.26; 'header:X-Complaints-To:1': 0.26; 'equivalent': 0.27; 'parameters': 0.27; 'values': 0.28; 'implicitly': 0.29; 'tail': 0.29; 'convert': 0.29; 'there.': 0.30; 'subject:/': 0.30; 'posts': 0.30; 'statement': 0.32; 'useful': 0.33; 'call,': 0.33; 'label': 0.35; 'but': 0.36; 'there': 0.36; 'subject:" ': 0.36; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'received:org': 0.37; 'drop': 0.38; 'why': 0.39; 'goes': 0.39; 'does': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'skip:u 10': 0.61; 'above,': 0.63; 'received:96': 0.63; 'statement,': 0.66; "'while'": 0.84; 'subject:any': 0.84; 'subject:else': 0.84; 'subject:sense': 0.84; 'victor': 0.84; 'received:fios.verizon.net': 0.91; 'same,': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: pool-96-227-207-81.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: Xref: csiph.com comp.lang.python:110787 On 6/29/2016 6:01 AM, Victor Savu wrote: > There are many posts trying to explain the else after for or while. My take: a while statement *is* a repeated if statement, and that is how it is implemented. while condition: true() is equivalent to and implemented in machine language without a native while command as