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


Groups > comp.lang.python > #45281

Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ]

Date 2013-05-14 13:20 +1000
From Cameron Simpson <cs@zip.com.au>
Subject Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ]
References <5191964D.9040900@davea.name>
Newsgroups comp.lang.python
Message-ID <mailman.1656.1368502086.3114.python-list@python.org> (permalink)

Show all headers | View raw


On 13May2013 21:41, Dave Angel <davea@davea.name> wrote:
| On 05/13/2013 07:30 PM, Cameron Simpson wrote:
| >On 13May2013 19:22, Dave Angel <davea@davea.name> wrote:
| >| On 05/13/2013 06:53 PM, Mark Lawrence wrote:
| >| >I much prefer the alternative <> for != but some silly people insisted
| >| >that this be removed from Python3.  Just how stupid can you get?
| >|
| >| So which special methods should the <> operator call?  By rights it
| >| ought to call both __gt__ and __lt__ and return True if either of
| >| them is True.
| >
| >Surely it should require both of them to be true...
| 
| Then it would never be true.  At least not for numbers.

Well that was the point. The _symbol_ looks like it should want
both. Next time I'll include the smiley.

Cheers,
-- 
Cameron Simpson <cs@zip.com.au>

I really don't like :-) symbols as well. I feel that if you can't see the pie
coming, you deserve whipped cream up your nose.
        - robd@cherry.cray.com (rob derrick)

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


Thread

Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ] Cameron Simpson <cs@zip.com.au> - 2013-05-14 13:20 +1000

csiph-web