[Python-ideas] A Continuations Compromise in Python

Jim Jewett jimjjewett at gmail.com
Wed May 6 05:31:40 CEST 2009


On 5/5/09, spir <denis.spir at free.fr> wrote:
> Le Tue, 5 May 2009 07:29:22 -0500,
> John Graham <john.a.graham at gmail.com> s'exprima ainsi:

>> I had another proposal on the actual keyword front,
>> "return from", which looks like it would kind of provide some symmetry
>> to the 'return' and 'yield' constructs and also reads pretty
>> intuitively, in my opinion.

> Sounds good imo.
> return --> the process does not go farther in the curent func
> from   --> there a detour

Starting with a clean slate, I would agree.

In practice, "return from" may already have too strong an association
with its use in lisp-like languages.  The real meaning here is closer
to GOTO; I would expect a "return from" to pop several layers from the
stack (rather that simply replacing the current one).

-jJ



More information about the Python-ideas mailing list