Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: True == 1 weirdness Date: Wed, 16 Sep 2015 17:46:45 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 32 Message-ID: References: <0b949fe0-09b4-46b0-b4ac-a85a9bfebfd5@googlegroups.com> <1442412230.1762717.385286049.20841F36@webmail.messagingengine.com> <87oah2jq4y.fsf@elektro.pacujo.net> <55F99ADB.5020405@mail.de> <55f9a94d$0$1641$c3e8da3$5496439d@news.astraweb.com> NNTP-Posting-Host: 67-130-15-94.dia.static.qwest.net X-Trace: reader1.panix.com 1442425605 23343 67.130.15.94 (16 Sep 2015 17:46:45 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Wed, 16 Sep 2015 17:46:45 +0000 (UTC) User-Agent: slrn/1.0.2 (Linux) Xref: csiph.com comp.lang.python:96704 On 2015-09-16, Steven D'Aprano wrote: > On Thu, 17 Sep 2015 02:57 am, Random832 wrote: > > >> I think that chaining should be limited to: >> >> A) all operators are "=" >> B) all operators are "is" >> C) all operators are either >= or > >> D) all operators are either <= or < >> >> There's no other scenario, if the operators have natural meanings, that >> it would actually be natural to write it that way. > > > 0 <= x < y == z > > The main reason for supporting arbitrary chained operators is that they > could be overloaded and have some meaning that makes sense: In my experience, that just doesn't happen. Yes, they can be overloaded, but doing that and then chaining them isn't going to make sense to anybody but the author (and temporarily even then). > node = left <= ptr => right Exactly. I've no clue what that means. ;) -- Grant Edwards grant.b.edwards Yow! Zippy's brain cells at are straining to bridge gmail.com synapses ...