Path: csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.048 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.02; 'operator': 0.03; 'puts': 0.07; 'thu,': 0.15; 'comparison.': 0.16; 'itself;': 0.16; 'swaps': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; 'variable': 0.18; '2015': 0.20; 'consistent': 0.23; 'second': 0.24; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'code': 0.30; 'another': 0.32; 'received:google.com': 0.35; "isn't": 0.35; 'to:addr:python- list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'rather': 0.39; 'to:addr:python.org': 0.40; 'john': 0.61; 'more': 0.63; 'subject:value': 0.84; 'to:name:python': 0.84; 'subject:Check': 0.95; 'hand,': 0.97 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=g22XgM0payLCd3MrAWgjL3M0cRxwAQ0Qd3oYaDfvwf4=; b=E4CBV5CKlQdGf6VDCFxmo0LW37wAzmp+SnZal2rTPie7nX8fuQqeG3xtoUOv/xp5FF mV5nZTITfgNk+viuT1X2Lr76UiTDxP+CZSnnR1q5PoFsp65y4+sCgoRMosCZEX4w6Lrb +FoxD1F8g3NjEH+pX8LE47NzC0FrDotew71H0tquNRa72f7QoYI3tFtu59Gg6rdVuwOL K01AETAtdRriyssA8Vz/hR59GWSVRGGEI7++RpZ28Kgk5H3a1+2DvWu+luTqyDr+QGe2 kVJg/G8bwk/PD37RuSYEjoMDwNLSwgl9boX4lTPalpGWxbRGrHQ0rrd4kThrGJoCSFt8 uu+A== X-Received: by 10.107.155.146 with SMTP id d140mr16559256ioe.43.1443737048641; Thu, 01 Oct 2015 15:04:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <560d78e2$0$1618$c3e8da3$5496439d@news.astraweb.com> <560d8726$0$1602$c3e8da3$5496439d@news.astraweb.com> <87r3le1ht3.fsf@elektro.pacujo.net> From: Ian Kelly Date: Thu, 1 Oct 2015 16:03:28 -0600 Subject: Re: Check if a given value is out of certain range To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1443737548 news.xs4all.nl 23864 [2001:888:2000:d::a6]:43530 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:97314 On Thu, Oct 1, 2015 at 3:45 PM, John Gordon wrote: > In <87r3le1ht3.fsf@elektro.pacujo.net> Marko Rauhamaa writes: >> Wouldn't > >> x < 0 or 10 < x > >> be even more visual? > > [SNIP] > > Another strike is that the code isn't consistent with itself; it puts the > variable on the left in the first comparison, then swaps to the right for > the second comparison. And on the other hand, it consistently uses the < operator rather than swapping to > for the second comparison.