Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45276
| Date | 2013-05-13 21:41 -0400 |
|---|---|
| From | Dave Angel <davea@davea.name> |
| Subject | Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ] |
| References | <519175B0.90603@davea.name> <20130513233040.GA97066@cskk.homeip.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1654.1368495711.3114.python-list@python.org> (permalink) |
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. > > Personally I'm for != given we have ==. Aside from notational > consistency it makes conceptual sense for unordered types, which > <> does not really. That's the point of mentioning __gt__ and __lt__, they aren't available on unordered types. -- DaveA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ] Dave Angel <davea@davea.name> - 2013-05-13 21:41 -0400
csiph-web