Proposed keyword to transfer control to another function

Antoon Pardon antoon.pardon at rece.vub.ac.be
Fri Jul 17 03:17:39 EDT 2015


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.





More information about the Python-list mailing list