Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!news.astraweb.com!border5.a.newsrouter.astraweb.com!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'operator': 0.03; 'from:addr:yahoo.co.uk': 0.05; 'false.': 0.07; 'objects,': 0.07; 'problem?': 0.07; 'here?': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'thu,': 0.15; '"in"': 0.16; 'at,': 0.16; 'hazard': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'typo': 0.16; 'wrote:': 0.16; 'language': 0.19; '>>>': 0.20; '2015': 0.20; 'meant': 0.22; 'assuming': 0.22; 'lawrence': 0.22; 'sep': 0.22; 'trying': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'comparison': 0.29; 'correct,': 0.29; 'equality': 0.29; 'operators': 0.29; 'types.': 0.29; 'objects': 0.29; "i'm": 0.30; "i'd": 0.31; 'guess': 0.31; 'language.': 0.32; "d'aprano": 0.33; 'steven': 0.33; 'similar': 0.33; 'equal': 0.34; 'could': 0.35; 'should': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'to:addr:python.org': 0.40; 'where': 0.40; 'mark': 0.40; 'relationship': 0.61; 'charset:windows-1252': 0.62; 'different': 0.63; 'our': 0.64; 'between': 0.65; 'pythonistas,': 0.84; 'subject:True': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: True == 1 weirdness Date: Wed, 16 Sep 2015 21:38:30 +0100 References: <0b949fe0-09b4-46b0-b4ac-a85a9bfebfd5@googlegroups.com> <1442412230.1762717.385286049.20841F36@webmail.messagingengine.com> <55f9a7e4$0$1661$c3e8da3$5496439d@news.astraweb.com> <55F9A9C1.7060001@mail.de> 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.2.0 In-Reply-To: <55F9A9C1.7060001@mail.de> 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: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442436008 news.xs4all.nl 23746 [2001:888:2000:d::a6]:44489 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96721 On 16/09/2015 18:41, Sven R. Kunze wrote: > On 16.09.2015 19:33, Steven D'Aprano wrote: >> On Thu, 17 Sep 2015 01:40 am, Random832 wrote: >> >>> "in" suggests a relationship between objects of different types (X and >>> "something that can contain X") - all the other comparison operators are >>> meant to work on objects of the same or similar types. >> `is` and the equality operators are intended to work on arbitrary >> objects, >> as are their inverses `is not` and inequality. >> >> And with operator overloading, < <= > and => could have any meaning you >> like: >> >> graph = a => b => c <= d <= e >> > > Sorry? What are you trying to do here? > Typo I'd hazard a guess at, should be graph = a >= b >= c <= d <= e Assuming that I'm correct, graph is True if a is greater than or equal to b and b is greater than equal to c and c is less than or equal to d and d is less than or equal to e else False. So where is the problem? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence