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


Groups > comp.lang.python > #93995

Re: Proposed keyword to transfer control to another function

Return-Path <antoon.pardon@rece.vub.ac.be>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.074
X-Spam-Evidence '*H*': 0.85; '*S*': 0.00; 'broken': 0.03; 'received:134': 0.05; 'python.': 0.11; 'programs.': 0.11; 'cons': 0.16; 'himself.': 0.16; 'identifier.': 0.16; 'keyword,': 0.16; 'received:ac.be': 0.16; 'strength': 0.16; 'usage,': 0.16; 'wrote:': 0.16; 'shell': 0.18; 'am,': 0.23; 'unix': 0.24; 'header :In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'sense': 0.26; 'chris': 0.26; 'least': 0.27; 'question': 0.27; 'turns': 0.27; 'fine': 0.28; 'certainly': 0.30; 'received:be': 0.30; "can't": 0.32; 'useful': 0.33; 'combination': 0.33; 'open': 0.33; 'similar': 0.33; 'done': 0.35; 'propose': 0.35; 'something': 0.35; 'should': 0.36; 'there': 0.36; 'keyword': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'spread': 0.37; "won't": 0.38; 'anything': 0.38; 'someone': 0.38; 'whatever': 0.39; 'enough': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'future': 0.60; 'him': 0.60; 'wide': 0.61; 'programs': 0.62; 'different': 0.63; 'here': 0.66; 'talking': 0.67; 'spend': 0.67; 'worth': 0.67; 'pro': 0.70; 'wish': 0.71; 'introduce': 0.79; '"yield': 0.84; 'find.': 0.84; 'from"': 0.84; 'luck': 0.95
X-IronPort-Anti-Spam-Filtered true
X-IronPort-Anti-Spam-Result ApkIAK6rqFWGuA9G/2dsb2JhbABahCsBg0e9WYJUAoIPAQEBAQEBhS8BAQQjVRELGAICBRYLAgIJAwIBAgFFEAMIAogquUiRRoRmASuBIooqhQ0WglKBQwEElE2MHYRpg1KQSCaDfoM4AQEB
Date Fri, 17 Jul 2015 09:17:39 +0200
From Antoon Pardon <antoon.pardon@rece.vub.ac.be>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Proposed keyword to transfer control to another function
References <CAPTjJmq7_sG+HmMCBPWq2A3GQFPix-OjUTCu+yAmWiJmEFy6PA@mail.gmail.com>
In-Reply-To <CAPTjJmq7_sG+HmMCBPWq2A3GQFPix-OjUTCu+yAmWiJmEFy6PA@mail.gmail.com>
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.632.1437117462.3674.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1437117462 news.xs4all.nl 2873 [2001:888:2000:d::a6]:56369
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 4205
X-Received-Body-CRC 1635545215
Path csiph.com!usenet.pasdenom.info!news.stben.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Xref csiph.com comp.lang.python:93995

Show key headers only | View raw


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.

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


Thread

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

csiph-web