Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #97402
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.020 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'else:': 0.03; 'from:addr:yahoo.co.uk': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'def': 0.13; 'function?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'soap,': 0.16; 'wrote:': 0.16; 'language': 0.19; 'clock': 0.22; 'cycles': 0.22; 'lawrence': 0.22; 'defined': 0.23; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'code': 0.30; 'language.': 0.32; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'received:org': 0.37; 'wrong': 0.38; 'why': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'mark': 0.40; 'your': 0.60; 'greetings,': 0.61; 'charset:windows-1252': 0.62; 'our': 0.64; 'as:': 0.79; 'pythonistas,': 0.84; 'subject:value': 0.84; 'wash': 0.84; 'burn': 0.91; 'subject:Check': 0.95 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
| Subject | Re: Check if a given value is out of certain range |
| Date | Mon, 5 Oct 2015 10:19:56 +0100 |
| 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> <muhntk$i8o$1@ger.gmane.org> <FC4F69DD-9BDA-450C-B27A-B58E4DAE3C71@xs4all.nl> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | 195.147.66.69 |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
| In-Reply-To | <FC4F69DD-9BDA-450C-B27A-B58E4DAE3C71@xs4all.nl> |
| 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.381.1444036829.28679.python-list@python.org> (permalink) |
| Lines | 28 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1444036829 news.xs4all.nl 23769 [2001:888:2000:d::a6]:43635 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:97402 |
Show key headers only | View raw
On 05/10/2015 09:18, Michiel Overtoom wrote:
>
> Why not use a function?
>
>
> if outside(x, 0, 10):
> print("x has wrong value")
> else:
> print("x has good value")
>
>
> where 'outside' is defined as:
>
> def outside(value, lowerbound, upperbound):
> return value < lowerbound or value > upperbound
>
> Greetings,
>
Please wash your mouth out with soap, burn precious clock cycles just to
make code readable, never I say :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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