Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'broken': 0.03; 'cc:addr :python-list': 0.09; 'python.': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'identifier.': 0.16; 'keyword,': 0.16; 'keyword.': 0.16; 'sense,': 0.16; 'usage,': 0.16; 'wrote:': 0.16; 'say,': 0.18; 'shell': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'preferred': 0.20; 'am,': 0.23; 'unix': 0.24; 'header:In-Reply-To:1': 0.24; 'sense': 0.26; 'chris': 0.26; 'fri,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'this.': 0.28; "can't": 0.32; 'combination': 0.33; 'open': 0.33; 'similar': 0.33; 'received:google.com': 0.35; 'propose': 0.35; 'should': 0.36; 'keyword': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; "won't": 0.38; 'anything': 0.38; 'whatever': 0.39; 'enough': 0.39; 'rather': 0.39; 'programs': 0.62; 'different': 0.63; 'jul': 0.72; '"yield': 0.84; 'chrisa': 0.84; 'from"': 0.84; 'pardon': 0.84; 'to:none': 0.91 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:cc :content-type; bh=n5bkRTG+g/G7gDBUwf07Wtcl2zJYxmLNfUYRWDpctWU=; b=gKKWHH9tpVwyVutuu7yNkACyWhPLrLMo9BTqNATmeL8+EdUlk7oWvd2OAXqyLcFeZx gKfwccUJUpsPioVf3GPveWCS4H5J0iSiRd1yrOjdfig/Ioh1zIUL6dmChYmVgYU3o8Mj c2gh/9i7BYjMKspLF3Gr/VuCSQiVHXZMWlqVdezTlAmmDVo45hDccKsZ6MwjyVGuwpvV MB+cjpm6tJ5x/h0rNZjZ2DNhokQCPyeJawP3JrNll9y/cLcrRl+KESvARz9TiLdmbNB6 Uo3X56Z0FjAjVhywrCFuNK9muoE33d25m1EmSAo9XVmOQudJrpq8ZKL8zyibmOTiZ+eY LavQ== MIME-Version: 1.0 X-Received: by 10.107.4.1 with SMTP id 1mr16353786ioe.10.1437129836062; Fri, 17 Jul 2015 03:43:56 -0700 (PDT) In-Reply-To: <55A8AC13.8070803@rece.vub.ac.be> References: <55A8AC13.8070803@rece.vub.ac.be> Date: Fri, 17 Jul 2015 20:43:56 +1000 Subject: Re: Proposed keyword to transfer control to another function From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1437129838 news.xs4all.nl 2850 [2001:888:2000:d::a6]:34638 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:94001 On Fri, Jul 17, 2015 at 5:17 PM, Antoon Pardon wrote: > On 07/17/2015 01:46 AM, Chris Angelico wrote: >> Open for bikeshedding: What should the keyword be? We can't use >> "exec", which would match Unix and shell usage, because it's already >> used in a rather different sense in Python. Current candidates: >> "transfer", "goto", "recurse", and anything else you suggest. > > I propose the combination "return from". I think it is similar enough > with "yield from" to justify this and it also won't need an extra > keyword, so no programs will be broken because they used "transfer", > "goto" or whatever other new keyword as an identifier. > Oooh I like this. The parallel makes sense, and as you say, no new keyword. Yes, "return from" is my new preferred command! ChrisA