Feature suggestion -- return if true

Ian Kelly ian.g.kelly at gmail.com
Tue Apr 12 20:29:41 CEST 2011


On Tue, Apr 12, 2011 at 12:25 PM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> On Tue, Apr 12, 2011 at 12:00 PM, Teemu Likonen <tlikonen at iki.fi> wrote:
>> 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))
>
> Flow-control macros were suggested as part of PEP 343, but they were
> rejected by Guido based on this rant:
>
> http://blogs.msdn.com/b/oldnewthing/archive/2005/01/06/347666.aspx

Sorry, that should have been PEP 340, which was rejected in favor of 343.



More information about the Python-list mailing list