Proposed keyword to transfer control to another function

Chris Angelico rosuav at gmail.com
Fri Jul 17 12:43:56 CEST 2015


On Fri, Jul 17, 2015 at 5:17 PM, Antoon Pardon
<antoon.pardon at 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!

ChrisA


More information about the Python-list mailing list