Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Teemu Likonen Newsgroups: comp.lang.python Subject: Re: Feature suggestion -- return if true Date: Tue, 12 Apr 2011 21:00:54 +0300 Organization: A noiseless patient Spider Lines: 22 Message-ID: <87k4eze4dl.fsf@mithlond.arda> References: <8abff237-5ccd-4eb6-85c8-cdc9e87520b7@bl1g2000vbb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: mx03.eternal-september.org; posting-host="TcTTtsh3Iz4M1vNcTNIcFQ"; logging-data="24836"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/noQFv6/AVn15tn/Khz02Shww1HtHn2gI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:k1oWg4PUAHMbE9hukMz2PbmSkls= sha1:A6WvBW8K9WtAl5xiB1qVYE9HhYE= Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3068 * 2011-04-12T10:27:55+10:00 * James Mills wrote: > On Tue, Apr 12, 2011 at 9:17 AM, zildjohn01 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))