Proposed keyword to transfer control to another function

sohcahtoa82 at sohcahtoa82 at
Fri Jul 17 19:15:40 CEST 2015

On Friday, July 17, 2015 at 12:17:55 AM UTC-7, 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.
> Should there be someone who is willing to spend time on this, I wish
> him all luck and strength he can find. I think it would be best if
> it was done by someone who is interrested in using this in his own
> programs. Because it is all very fine talking about the pro and
> cons here and I certainly would use it, the question is, how wide
> spread would the use become and is it worth the time and effort to
> introduce it. If future use turns out to be disappointing such a
> coder can at least think of it as something that was useful for
> himself.
> -- 
> Antoon.

"return from" or "yield from" looks too much like a COMEFROM instruction/statement.

More information about the Python-list mailing list