Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: for / while else doesn't make sense Date: Wed, 15 Jun 2016 09:51:37 -0400 Lines: 41 Message-ID: References: <9e7b6ded-15ad-490a-9842-b3da5d8a048d@googlegroups.com> <575d3430$0$11108$c3e8da3@news.astraweb.com> <575e167a$0$1608$c3e8da3$5496439d@news.astraweb.com> <575f6f58$0$1591$c3e8da3$5496439d@news.astraweb.com> <036dbf77-9483-4c71-a86b-f03cbf55cc3b@googlegroups.com> <5760c795$0$1609$c3e8da3$5496439d@news.astraweb.com> <26329884-d598-4f32-87b8-d75a3d109d20@googlegroups.com> <1465998697.330207.638463505.7EA18520@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de rxk1H1rjZ0RW12PeYAXpdwrNA5LCn+kCuKfduOYEfppg== 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; 'else:': 0.03; 'so?': 0.07; 'received:internal': 0.09; 'subject:while': 0.09; 'url:blog': 0.10; 'wed,': 0.15; '"if"': 0.16; 'constructs': 0.16; 'end;': 0.16; 'keywords.': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'received:psf.io': 0.16; 'subject:make': 0.16; 'sugar': 0.16; 'syntactic': 0.16; 'wrote:': 0.16; 'examples': 0.24; 'written': 0.24; 'header:In- Reply-To:1': 0.24; 'example': 0.26; '15,': 0.30; 'statement': 0.32; 'url:06': 0.33; "isn't": 0.35; 'url:org': 0.36; 'flow': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'thought': 0.37; 'detail': 0.38; 'itself': 0.38; 'received:66': 0.38; 'does': 0.39; 'to:addr:python.org': 0.40; 'skip:u 10': 0.61; 'body': 0.61; 'header:Message-Id:1': 0.61; 'subject: / ': 0.63; 'more': 0.63; 'within': 0.64; 'for:': 0.64; 'here': 0.66; 'subject:else': 0.84; 'subject:sense': 0.84; 'url:2016': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=vWRDzXNDRo2mmoHUtCCHTldSoZQ=; b=vx2T6T 01v1t0sWb5jg063ZXfwr8u/DwLqsmuUzsKQynQdGs90EQJZy+wAz/AalSLbupybp VsiwHAUmDb8abGEK/jFvYys9YCHM+A8XPVCNSlPL6nH8M4VAC8MxcTFcryY9jUAC F5HfhsikSzNVRzqcHe4enftgmbgiNnjeZ3A0U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=vWRDzXNDRo2mmoH UtCCHTldSoZQ=; b=YkqiH6uC3w//aE9F8q1ZkNl4Vxp0RyPQJkqbZdgUf+sJw2L e7fLdPaAj5eDONPV322zMyxVL+EMx/32CNg2Dm/Da0mfnF4zzN5TPx4gVJqcXA96 p3qGGJ16+M4lm+SJTv/+fHnanSjvpUAmqtooayhc7gd0n9Np1aVFqFX37WUE= X-Sasl-Enc: Ng1GKFgAjRkde4f6XhIkbZv7yTfBYBivr+OpZpht3ZWQ 1465998697 X-Mailer: MessagingEngine.com Webmail Interface - ajax-aff28cd1 In-Reply-To: <26329884-d598-4f32-87b8-d75a3d109d20@googlegroups.com> 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: <1465998697.330207.638463505.7EA18520@webmail.messagingengine.com> X-Mailman-Original-References: <9e7b6ded-15ad-490a-9842-b3da5d8a048d@googlegroups.com> <575d3430$0$11108$c3e8da3@news.astraweb.com> <575e167a$0$1608$c3e8da3$5496439d@news.astraweb.com> <575f6f58$0$1591$c3e8da3$5496439d@news.astraweb.com> <036dbf77-9483-4c71-a86b-f03cbf55cc3b@googlegroups.com> <5760c795$0$1609$c3e8da3$5496439d@news.astraweb.com> <26329884-d598-4f32-87b8-d75a3d109d20@googlegroups.com> Xref: csiph.com comp.lang.python:109968 On Wed, Jun 15, 2016, at 07:19, Rustom Mody wrote: > I thought there'd be many examples for showing that break is just goto in > disguise... Evidently not > > So here is an example in more detail for why/how break=goto: > > http://blog.languager.org/2016/06/break-is-goto-in-disguise.html So? So are loops. So is any "if" statement whose body isn't itself a one-line goto. Showing that break can be written as a goto is uninteresting because _any_ form of flow control can be written as a goto, and in particular it does not establish that break is in any way less structured than any other constructs that have keywords. C's for loop: for(i=0;i goto end;] [continue within body -> goto inc;] if(x) true_body; else false_body; is syntactic sugar for: if(!x) goto else; true_body; goto end; else: false_body; end: ;