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


Groups > comp.lang.python > #45271 > unrolled thread

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

Started byCameron Simpson <cs@zip.com.au>
First post2013-05-14 09:30 +1000
Last post2013-05-14 09:30 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

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

FromCameron Simpson <cs@zip.com.au>
Date2013-05-14 09:30 +1000
SubjectRe: Differences of "!=" operator behavior in python3 and python2 [ bug? ]
Message-ID<mailman.1649.1368487859.3114.python-list@python.org>
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...

Personally I'm for != given we have ==. Aside from notational
consistency it makes conceptual sense for unordered types, which
<> does not really.

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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web