Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '*is*': 0.09; 'parsing': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'pm,': 0.11; '>>>': 0.12; 'am,': 0.14; 'wrote:': 0.14; '*always*': 0.16; 'benefit.': 0.16; 'defending': 0.16; 'expr': 0.16; 'gave.': 0.16; 'guys.': 0.16; 'none"': 0.16; 'statements.': 0.16; 'terminates': 0.16; 'meant': 0.18; 'call.': 0.19; 'true,': 0.19; 'tue,': 0.20; 'language': 0.20; 'header:In-Reply-To:1': 0.22; 'pointed': 0.25; 'subject: -- ': 0.25; 'equivalent': 0.26; 'statement': 0.26; "i'm": 0.26; 'function': 0.27; "doesn't": 0.28; 'definition': 0.29; 'nobody': 0.29; 'translation': 0.29; 'view,': 0.29; 'assuming': 0.29; 'seem': 0.30; 'this.': 0.30; 'solved': 0.31; 'whereas': 0.31; 'to:addr:python-list': 0.32; 'agree': 0.32; 'expression': 0.33; 'sufficient': 0.33; 'header:X-Complaints- To:1': 0.34; 'actually': 0.34; 'starting': 0.34; 'difference': 0.35; 'suggestion': 0.35; 'header:User-Agent:1': 0.35; 'suggested': 0.35; 'considered': 0.36; 'should': 0.37; 'apr': 0.38; 'but': 0.38; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'header:Mime-Version:1': 0.39; 'add': 0.39; 'would': 0.40; 'header:Received:5': 0.40; '2011': 0.62; 'property': 0.62; 'making': 0.62; 'become': 0.70; 'hand,': 0.72; '06:55': 0.84; 'complexity': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: "Colin J. Williams" Subject: Re: Feature suggestion -- return if true Date: Tue, 12 Apr 2011 10:01:45 -0400 References: <8abff237-5ccd-4eb6-85c8-cdc9e87520b7@bl1g2000vbb.googlegroups.com> <0169e388-9bf8-4d21-b534-d8f71d96aa85@k30g2000yqb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 69-196-161-193.dsl.teksavvy.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: <0169e388-9bf8-4d21-b534-d8f71d96aa85@k30g2000yqb.googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1302616934 news.xs4all.nl 81473 [::ffff:82.94.164.166]:38827 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3049 On 12-Apr-11 06:55 AM, scattered wrote: > On Apr 12, 2:21 am, James Mills wrote: >> On Tue, Apr 12, 2011 at 4:08 PM, Nobody wrote: >>> It should be abundantly clear that this only returns if the expression is >>> considered true, otherwise it continues on to the following statements. >> >> Uggh come on guys. We've been over this. >> You cannot make that assumption. >> >> cheers >> James >> >> -- >> -- James Mills >> -- >> -- "Problems are solved by method" > > I'm puzzled as to why you seem to be parsing the OP's statements > different from everybody else. The only assumption that people other > than you seem to be making is that they are assuming that the OP meant > what he said. He *gave* a definition of what he meant by return? and > the definition he actually gave has the property that it terminates > the function only when the condition is true, whereas your suggested > translation *always* terminates the function call. I agree with > "Nobody" that the OP's intention was "abundantly clear". Your "return > expr or None" suggestion was not an unreasonable try - but it doesn't > provide something which is equivalent to what the OP gave. On the > other hand, your persistence in defending your original statement as a > plausible translation of return? after the difference has been pointed > out by various posters *is* starting to become unreasonable. In my view, the suggestion would add complexity to the language without sufficient benefit. Colin W.