Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #94041

Re: Proposed keyword to transfer control to another function

Date 2015-07-18 09:31 +1000
From Cameron Simpson <cs@zip.com.au>
Subject Re: Proposed keyword to transfer control to another function
References <CAPTjJmqOE2XmfFFa0NZCwuwPbM0=11ii7+GnZaAp9J1=qCeOaQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.668.1437177558.3674.python-list@python.org> (permalink)

Show all headers | View raw


On 17Jul2015 20:43, Chris Angelico <rosuav@gmail.com> wrote:
>On Fri, Jul 17, 2015 at 5:17 PM, Antoon Pardon
><antoon.pardon@rece.vub.ac.be> 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!

+1

Cheers,
Cameron Simpson <cs@zip.com.au>

A pessimist is an optimist in full possession of the facts.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Proposed keyword to transfer control to another function Cameron Simpson <cs@zip.com.au> - 2015-07-18 09:31 +1000

csiph-web