Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:error': 0.03; 'tries': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:while': 0.09; 'bind': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'roy': 0.16; 'subject:program': 0.16; 'tighter': 0.16; 'subject:python': 0.16; 'written': 0.21; 'interpret': 0.24; 'url:home': 0.24; 'mon,': 0.24; 'right.': 0.26; 'second': 0.26; 'header:X-Complaints-To:1': 0.27; 'probably': 0.32; 'guess': 0.33; 'reader': 0.33; 'maybe': 0.34; "i'd": 0.34; 'could': 0.34; 'problem': 0.35; 'case,': 0.35; 'one,': 0.35; 'there': 0.35; 'charset:us-ascii': 0.36; 'should': 0.36; 'two': 0.37; 'to:addr:python-list': 0.38; 'that,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'chance': 0.65; 'news': 0.67; 'smith': 0.68; 'subject:First': 0.74; 'received:108': 0.93; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: First python program, syntax error in while loop Date: Mon, 06 May 2013 20:16:58 -0400 Organization: > Bestiaria Support Staff < References: <24c5856e-a30a-41bd-aa4a-0e594734e1f8@googlegroups.com> <163bd508-f225-4b4d-8173-1e070c5d5aad@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-216-163.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367885833 news.xs4all.nl 15918 [2001:888:2000:d::a6]:43306 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44865 On Mon, 06 May 2013 09:08:44 -0400, Roy Smith declaimed the following in gmane.comp.python.general: > > In this case, however, I have no problem with the extra parens. Look at > these two statements: > > >> while (number != guess) and (tries < 5): > >> while number != guess and tries < 5: > > They have the same meaning. To correctly interpret the second one, you > need to know that != and < bind tighter than "and". One could say that > you should know that, and maybe you would be right. > If there were a chance of confusion, I'd probably have written it while (number != guess and tries < 5) : (yes, a deliberate line break, not a news reader line wrap) -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/