Feature suggestion -- return if true

Teemu Likonen tlikonen at iki.fi
Tue Apr 12 20:00:54 CEST 2011


* 2011-04-12T10:27:55+10:00 * James Mills wrote:

> On Tue, Apr 12, 2011 at 9:17 AM, zildjohn01 <zildjohn01 at gmail.com> wrote:
>> This is an idea I've had bouncing around in my head for a long time
>> now. I propose the following syntax:
>
> Maybe this is more appropriare for the python-ideas list ?
>
>>    return? expr
>
> This syntax does not fit well within python ideology.

I'm a simple Lisp guy who wonders if it is be possible to add some kind
of macros to the language. Then features like this could be added by
anybody. Lisp people do this all the time and there is no need for
feature requests or any discussions.

    (with-returns
       ;; some code
       (return-if foo)
       ;; more code
       (return-if bar))



More information about the Python-list mailing list