Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Mark Lawrence Newsgroups: comp.lang.python Subject: Re: Why is break allowed in finally, but continue is not? Date: Mon, 14 Dec 2015 18:40:26 +0000 Lines: 28 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de cywRZLFrXkAPd2kh6p013wgGxgmH0JhyNjebobkNTdsg== 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; 'from:addr:yahoo.co.uk': 0.05; 'agree,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Why': 0.09; 'subject:not': 0.11; '*any*': 0.16; 'clause.': 0.16; 'inclined': 0.16; 'opposite': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:break': 0.16; 'subject:continue': 0.16; 'wrote:': 0.16; 'language': 0.19; '>>>': 0.20; 'all,': 0.20; '2015': 0.20; 'keywords,': 0.22; 'lawrence': 0.22; 'yesterday.': 0.22; 'header :In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'least': 0.27; 'question': 0.27; '13,': 0.29; 'referenced': 0.29; 'december': 0.32; 'language.': 0.32; 'statement': 0.32; 'url:python': 0.33; 'url:dev': 0.35; 'but': 0.36; 'should': 0.36; 'possible.': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'seem': 0.37; 'why': 0.39; 'to:addr:python.org': 0.40; 'mark': 0.40; 'charset:windows-1252': 0.62; 'our': 0.64; 'url:lists': 0.66; 'treat': 0.72; 'batchelder': 0.84; 'direction:': 0.84; 'ideas.': 0.84; 'mill': 0.84; 'pythonistas,': 0.84 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 38.26.147.195.pool.dsl.daisyplc.net User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100418 On 14/12/2015 17:37, Ned Batchelder wrote: > On Sunday, December 13, 2015 at 5:28:44 PM UTC-5, Ben Finney wrote: >> Ned Batchelder writes: >>> So why treat 'continue' specially? >> >> I am inclined to agree, but in the opposite direction: a case should be >> made for allowing *any* flow-control statement in an exception-handler's >> 'finally' clause. > > I agree, those all seem like bad ideas. But 'continue' has been singled > out for a SyntaxError. Rumor has it that continue was difficult to make > work at all, while the other keywords, while ill-advised, were at least > possible. > > --Ned. > Part of the rumour mill http://www.gossamer-threads.com/lists/python/dev/484210? This was referenced from the stackoverflow question that Ben Finney referred to yesterday. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence