Path: csiph.com!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '16,': 0.03; 'operator': 0.03; 'objects,': 0.07; 'operator,': 0.09; 'received:internal': 0.09; 'wed,': 0.15; 'thu,': 0.15; '"in"': 0.16; 'constructs': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'thankfully,': 0.16; 'wrote:': 0.16; '2015': 0.20; 'meant': 0.22; 'sep': 0.22; 'am,': 0.23; "haven't": 0.24; 'header:In-Reply-To:1': 0.24; 'comparison': 0.29; 'equality': 0.29; 'operators': 0.29; 'types.': 0.29; 'objects': 0.29; 'work.': 0.30; "can't": 0.32; "d'aprano": 0.33; 'steven': 0.33; 'though.': 0.33; 'similar': 0.33; 'could': 0.35; 'c++': 0.35; 'but': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; "won't": 0.38; 'received:66': 0.38; 'to:addr:python.org': 0.40; 'relationship': 0.61; 'header:Message-Id:1': 0.61; 'different': 0.63; 'between': 0.65; 'overload': 0.66; "they're": 0.66; 'subject:True': 0.93 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=owo4HcYeYXNyIRy5GZ7+SPBuz+c=; b=ARa+3F 8pwEMyX89q8wWfNqXZl60boXXfmoNUDHL6HUI95PTJGGGgGplS/ajeUoQjN1VTFE DQwkEZu/3vstvDyODzj2AISvyOB5eblSRWXey1blrH69DBlNoN3B4THJ38iKJ1fK gCF5WFaqqZRRHEgZnEHj0iBmxt1e2qWfeBCHQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=owo4HcYeYXNyIRy 5GZ7+SPBuz+c=; b=mFzDXTx79+9FT1uqBzG8bTfCvgI4fgmUSn9mQMb5iT9VaxS G3ABEQTdmzojKhjnjKRdzPDwiyt5XPr6H9ScQSZSOivA3kdmoLL7uy7+qq98PyzR iIKruMggnLg2VhXfnPkewThtAJgAVMZBUMuzjeowTStoEV8XJrES0jPNtBKI= X-Sasl-Enc: Wm35ZVrPK5UI37E2boVyaEWo991mzA7aGkD0rnqkSnEF 1442425635 From: Random832 To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-746d2121 Subject: Re: True == 1 weirdness Date: Wed, 16 Sep 2015 13:47:15 -0400 In-Reply-To: <55f9a7e4$0$1661$c3e8da3$5496439d@news.astraweb.com> References: <0b949fe0-09b4-46b0-b4ac-a85a9bfebfd5@googlegroups.com> <1442412230.1762717.385286049.20841F36@webmail.messagingengine.com> <55f9a7e4$0$1661$c3e8da3$5496439d@news.astraweb.com> 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442425636 news.xs4all.nl 23757 [2001:888:2000:d::a6]:48562 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96705 On Wed, Sep 16, 2015, at 13: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. But they won't return *true* unless they're the same or similar types. > And with operator overloading, < <= > and => could have any meaning you > like: > > graph = a => b => c <= d <= e Are you suggesting that all objects concerned are a magical "graph node object", the <= and [sic] => operators of which return "edge objects", the and operator of which constructs a graph object containing all such edges? That's *horrifying*. And won't actually work. We haven't actually got an => operator, thankfully, and you can't overload 'and'. I bet you could do it in C++ though.