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.041 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'wed,': 0.04; 'loop,': 0.07; 'equivalent.': 0.09; 'am,': 0.14; 'wrote:': 0.14; 'executed.': 0.16; 'fits': 0.16; 'mart\xednez': 0.16; 'readability.': 0.16; 'seems': 0.21; 'code': 0.22; 'header:In- Reply-To:1': 0.22; 'received:209.85.214.174': 0.23; 'received :mail-iw0-f174.google.com': 0.23; "didn't": 0.25; 'subject: -- ': 0.25; "i'm": 0.26; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; "doesn't": 0.28; 'depends': 0.29; 'named': 0.30; 'does': 0.31; 'actual': 0.31; 'to:addr:python-list': 0.32; 'idea': 0.32; 'actually': 0.34; 'advocate': 0.35; 'think': 0.36; 'received:209.85': 0.37; 'apr': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'received:209.85.214': 0.39; 'to:addr:python.org': 0.39; 'could': 0.39; 'received:209': 0.39; 'how': 0.39; 'header:Received:5': 0.40; '13,': 0.60; '2011': 0.62; 'cost': 0.63; 'here': 0.65; 'favour': 0.68; 'here.': 0.68; 'point:': 0.84; 'aka': 0.91; 'surname': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=pR3r6bxqgdlfwirn1OFg9x+SgbXuKSB9XVDaUpt84rs=; b=TNlkBeJDCgYIyyJlBiovdfCiA9aEqEOmi/91ruqNnEWqqNhxZxCJgCVFivZ0fvd24K dxc3aP9xXe3yvdMtVv7n6Vf5g6SqJr42PiCKf/tkLJZGQc+Qr2NNulNjK/RhCgJ/XT7a aIujB3Mqly8zm8s4i0zOStwE9Uff3gAnYqtbw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=PxeC0BieTG6vf8naUubvFcgUlWYoVk4kisxi4HJdg9Si871wv29mxzVZMr8Y4eM7su PL7CJrk1FSKBy5UljF9biW7KZRZDJ6rCpIgLQGxgTJpbtY0kTOujfTZS8NrCiIOcE5Ek Qn/2IIIhwOZ5EaBJH4P8fMqjYO7nNsh8NugLc= MIME-Version: 1.0 In-Reply-To: <1302648311.7968.0.camel@localhost.localdomain> References: <8abff237-5ccd-4eb6-85c8-cdc9e87520b7@bl1g2000vbb.googlegroups.com> <9ed613bb-dfab-490b-9043-706b88846056@bl1g2000vbb.googlegroups.com> <1302648311.7968.0.camel@localhost.localdomain> Date: Wed, 13 Apr 2011 08:52:27 +1000 Subject: Re: Feature suggestion -- return if true From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 18 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1302648750 news.xs4all.nl 81483 [::ffff:82.94.164.166]:36267 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3096 On Wed, Apr 13, 2011 at 8:45 AM, Westley Mart=EDnez wr= ote: >> I don't think that this is equivalent. The OP's original idea doesn't >> involve a loop, but this does - how could that be equivalent? > > Not OP's idea, Angelico's. I didn't actually advocate a loop, but that method could work too. It all depends on the actual code being executed. I'd still be in favour of shor-circuit Or operators for this, although it does cost readability. Side point: Interesting that I'm referred to by surname here. Seems there's a large number of people here named Chris - fits my theory that geeks are often named Chris, and vice versa! Chris Angelico aka Rosuav