Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #97314

Re: Check if a given value is out of certain range

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 <ian.g.kelly@gmail.com>
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 <muk9i9$h34$1@reader1.panix.com>
References <mailman.229.1443511549.28679.python-list@python.org> <muefce$ia9$1@dont-email.me> <mailman.246.1443558775.28679.python-list@python.org> <cc181da6-c1ea-483c-a059-f615cfdf1220@googlegroups.com> <mailman.280.1443652357.28679.python-list@python.org> <560d78e2$0$1618$c3e8da3$5496439d@news.astraweb.com> <mujth9$1s4$1@reader1.panix.com> <560d8726$0$1602$c3e8da3$5496439d@news.astraweb.com> <muk297$2t9$1@reader1.panix.com> <87r3le1ht3.fsf@elektro.pacujo.net> <muk9i9$h34$1@reader1.panix.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Thu, 1 Oct 2015 16:03:28 -0600
Subject Re: Check if a given value is out of certain range
To Python <python-list@python.org>
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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.317.1443737548.28679.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Thu, Oct 1, 2015 at 3:45 PM, John Gordon <gordon@panix.com> wrote:
> In <87r3le1ht3.fsf@elektro.pacujo.net> Marko Rauhamaa <marko@pacujo.net> 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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Check if a given value is out of certain range Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-09-29 16:48 +0000
  Re: Check if a given value is out of certain range Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-29 21:32 +0100
    Re: Check if a given value is out of certain range sohcahtoa82@gmail.com - 2015-09-30 11:31 -0700
      Re: Check if a given value is out of certain range Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-09-30 23:31 +0100
        Re: Check if a given value is out of certain range Steven D'Aprano <steve@pearwood.info> - 2015-10-02 04:18 +1000
          Re: Check if a given value is out of certain range John Gordon <gordon@panix.com> - 2015-10-01 18:20 +0000
            Re: Check if a given value is out of certain range Steven D'Aprano <steve@pearwood.info> - 2015-10-02 05:19 +1000
              Re: Check if a given value is out of certain range John Gordon <gordon@panix.com> - 2015-10-01 19:41 +0000
                Re: Check if a given value is out of certain range Marko Rauhamaa <marko@pacujo.net> - 2015-10-01 22:59 +0300
                Re: Check if a given value is out of certain range Emile van Sebille <emile@fenx.com> - 2015-10-01 13:15 -0700
                Re: Check if a given value is out of certain range John Gordon <gordon@panix.com> - 2015-10-01 21:45 +0000
                Re: Check if a given value is out of certain range Ian Kelly <ian.g.kelly@gmail.com> - 2015-10-01 16:03 -0600
                Re: Check if a given value is out of certain range Chris Kaynor <ckaynor@zindagigames.com> - 2015-10-01 15:48 -0700
                Re: Check if a given value is out of certain range Ian Kelly <ian.g.kelly@gmail.com> - 2015-10-01 16:01 -0600
                Re: Check if a given value is out of certain range Steven D'Aprano <steve@pearwood.info> - 2015-10-03 20:29 +1000
                Re: Check if a given value is out of certain range Bartc <bc@freeuk.com> - 2015-10-03 11:48 +0100
                Re: Check if a given value is out of certain range Laura Creighton <lac@openend.se> - 2015-10-03 14:12 +0200
                Re: Check if a given value is out of certain range Steven D'Aprano <steve@pearwood.info> - 2015-10-03 23:51 +1000
                Re: Check if a given value is out of certain range wxjmfauth@gmail.com - 2015-10-03 07:19 -0700
                Re: Check if a given value is out of certain range Steven D'Aprano <steve@pearwood.info> - 2015-10-05 00:47 +1100
                Re: Check if a given value is out of certain range Rustom Mody <rustompmody@gmail.com> - 2015-10-04 19:28 -0700
                Re: Check if a given value is out of certain range Rustom Mody <rustompmody@gmail.com> - 2015-10-04 19:32 -0700
                Re: Check if a given value is out of certain range Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-10-03 11:49 -0400
          Re: Check if a given value is out of certain range Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-10-02 00:34 +0100
      Re: Check if a given value is out of certain range Michiel Overtoom <motoom@xs4all.nl> - 2015-10-05 10:18 +0200
        Re: Check if a given value is out of certain range Jussi Piitulainen <harvesting@makes.email.invalid> - 2015-10-05 13:08 +0300
          Re: Check if a given value is out of certain range Marko Rauhamaa <marko@pacujo.net> - 2015-10-05 14:42 +0300
            Re: Check if a given value is out of certain range Chris Angelico <rosuav@gmail.com> - 2015-10-06 00:10 +1100
              Re: Check if a given value is out of certain range Marko Rauhamaa <marko@pacujo.net> - 2015-10-05 16:25 +0300
      Re: Check if a given value is out of certain range Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-10-05 10:19 +0100
  Re: Check if a given value is out of certain range Random832 <random832@fastmail.com> - 2015-09-29 17:04 -0400
    Re: Check if a given value is out of certain range Luca Menegotto <otlucaDELETE@DELETEyahoo.it> - 2015-09-30 07:57 +0200
  Re: Check if a given value is out of certain range Emile van Sebille <emile@fenx.com> - 2015-09-29 14:07 -0700
  Re: Check if a given value is out of certain range Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-29 15:07 -0600
    Re: Check if a given value is out of certain range Steven D'Aprano <steve@pearwood.info> - 2015-09-30 11:55 +1000
      Re: Check if a given value is out of certain range Random832 <random832@fastmail.com> - 2015-09-29 23:08 -0400
        Re: Check if a given value is out of certain range Steven D'Aprano <steve@pearwood.info> - 2015-09-30 13:14 +1000
          Re: Check if a given value is out of certain range Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-29 23:54 -0600
  Re: Check if a given value is out of certain range Tim Chase <python.list@tim.thechases.com> - 2015-09-29 18:44 -0500
    Re: Check if a given value is out of certain range alister <alister.nospam.ware@ntlworld.com> - 2015-09-30 09:41 +0000
      Re: Check if a given value is out of certain range John Gordon <gordon@panix.com> - 2015-09-30 15:42 +0000
      Re: Check if a given value is out of certain range Grant Edwards <invalid@invalid.invalid> - 2015-09-30 15:56 +0000
        Re: Check if a given value is out of certain range Marko Rauhamaa <marko@pacujo.net> - 2015-09-30 21:06 +0300
          Re: Check if a given value is out of certain range alister <alister.nospam.ware@ntlworld.com> - 2015-09-30 20:19 +0000
            Re: Check if a given value is out of certain range Ian Kelly <ian.g.kelly@gmail.com> - 2015-09-30 14:46 -0600
              Re: Check if a given value is out of certain range alister <alister.nospam.ware@ntlworld.com> - 2015-10-01 08:33 +0000
                Re: Check if a given value is out of certain range Chris Angelico <rosuav@gmail.com> - 2015-10-01 18:37 +1000
                Re: Check if a given value is out of certain range alister <alister.nospam.ware@ntlworld.com> - 2015-10-01 08:48 +0000
                Re: Check if a given value is out of certain range Ian Kelly <ian.g.kelly@gmail.com> - 2015-10-01 08:14 -0600
              Re: Check if a given value is out of certain range Steven D'Aprano <steve@pearwood.info> - 2015-10-02 04:59 +1000
            Re: Check if a given value is out of certain range Laura Creighton <lac@openend.se> - 2015-10-01 09:40 +0200
            Re: Check if a given value is out of certain range Laura Creighton <lac@openend.se> - 2015-10-01 09:58 +0200

csiph-web