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


Groups > comp.lang.python > #93995 > unrolled thread

Re: Proposed keyword to transfer control to another function

Started byAntoon Pardon <antoon.pardon@rece.vub.ac.be>
First post2015-07-17 09:17 +0200
Last post2015-07-17 10:15 -0700
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Proposed keyword to transfer control to another function Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-07-17 09:17 +0200
    Re: Proposed keyword to transfer control to another function sohcahtoa82@gmail.com - 2015-07-17 10:15 -0700

#93995 — Re: Proposed keyword to transfer control to another function

FromAntoon Pardon <antoon.pardon@rece.vub.ac.be>
Date2015-07-17 09:17 +0200
SubjectRe: Proposed keyword to transfer control to another function
Message-ID<mailman.632.1437117462.3674.python-list@python.org>
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.

[toc] | [next] | [standalone]


#94018

Fromsohcahtoa82@gmail.com
Date2015-07-17 10:15 -0700
Message-ID<1c11a4ba-505b-4e0a-9d64-d55236af330c@googlegroups.com>
In reply to#93995
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.

https://en.wikipedia.org/wiki/COMEFROM

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web