!= is explicit.
There is no ambiguity that needs to be guessed.
Which is why i said it thought X != Y is cleaner
i guess i wasn't totally clear, I would write X != Y its because the OP
preferred to use the other format I recommended that he made the operator
ordering explicit.
--
On Tue, May 14, 2013 at 9:22 AM, Dave Angel da...@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
On Tue, 14 May 2013 19:01:38 -0400, Dennis Lee Bieber wrote:
On 14 May 2013 05:09:48 GMT, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info declaimed the following in
gmane.comp.python.general:
The operator comes from Pascal, where it was used as not equal
since
I thought it
On Mon, 13 May 2013 05:23:16 +0600, Mr. Joe wrote:
I seem to stumble upon a situation where != operator misbehaves in
python2.x. Not sure if it's my misunderstanding or a bug in python
implementation. Here's a demo code to reproduce the behavior -
# -*- coding: utf-8 -*-
from __future__
On 13 May 2013 11:04, Alister alister.w...@ntlworld.com wrote:
this looks to me like an issue with operator precidence
you code is evaluating as (Not x) == y
rather than not (x == y)
I can say for sure that the precedence is as expected. I always use not
... == ... Instead of !=.
--
On 5/13/2013 1:26 PM, Fábio Santos wrote:
On 13 May 2013 11:04, Alister alister.w...@ntlworld.com
mailto:alister.w...@ntlworld.com wrote:
this looks to me like an issue with operator precidence
you code is evaluating as (Not x) == y
rather than not (x == y)
I can say for sure that the
On Tue, May 14, 2013 at 4:08 AM, Ned Batchelder n...@nedbatchelder.com wrote:
On 5/13/2013 1:26 PM, Fábio Santos wrote:
On 13 May 2013 11:04, Alister alister.w...@ntlworld.com wrote:
this looks to me like an issue with operator precidence
you code is evaluating as (Not x) == y
rather than
I think it is more readable. When doing more complicated statements I use
!= instead, but when it's a single test I prefer not … ==
It's a personal thing. It may also have to do with the fact that I didn't
know python had != when I was a novice.
On 13 May 2013 19:08, Ned Batchelder
On Mon, 13 May 2013 19:28:29 +0100, Fábio Santos wrote:
I think it is more readable. When doing more complicated statements I
use != instead, but when it's a single test I prefer not … ==
It's a personal thing. It may also have to do with the fact that I
didn't know python had != when I was
On Mon, May 13, 2013 at 10:17 PM, Alister alister.w...@ntlworld.com wrote:
On Mon, 13 May 2013 19:28:29 +0100, Fábio Santos wrote:
I think it is more readable. When doing more complicated statements I
use != instead, but when it's a single test I prefer not … ==
It's a personal thing. It may
On 13/05/2013 22:17, Alister wrote:
On Mon, 13 May 2013 19:28:29 +0100, Fábio Santos wrote:
I think it is more readable. When doing more complicated statements I
use != instead, but when it's a single test I prefer not … ==
It's a personal thing. It may also have to do with the fact that I
On 05/13/2013 06:53 PM, Mark Lawrence wrote:
On 13/05/2013 22:17, Alister wrote:
On Mon, 13 May 2013 19:28:29 +0100, Fábio Santos wrote:
I think it is more readable. When doing more complicated statements I
use != instead, but when it's a single test I prefer not … ==
It's a personal thing.
On 2013.05.13 17:53, Mark Lawrence wrote:
I much prefer the alternative for != but some silly people insisted
that this be removed from Python3.
It's not removed from Python 3, though:
Python 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 20:30:21) [MSC v.1600 64 bit
(AMD64)] on win32
Type help,
On 13May2013 19:22, Dave Angel da...@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?
On Mon, May 13, 2013 at 5:27 PM, Andrew Berg bahamutzero8...@gmail.com wrote:
On 2013.05.13 17:53, Mark Lawrence wrote:
I much prefer the alternative for != but some silly people insisted
that this be removed from Python3.
It's not removed from Python 3, though:
Python 3.3.1
On 05/13/2013 07:30 PM, Cameron Simpson wrote:
On 13May2013 19:22, Dave Angel da...@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
On 13May2013 21:41, Dave Angel da...@davea.name wrote:
| On 05/13/2013 07:30 PM, Cameron Simpson wrote:
| On 13May2013 19:22, Dave Angel da...@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
On Mon, 13 May 2013 19:22:24 -0400, Dave Angel wrote:
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.
The operator comes from Pascal, where it was used as not equal since
ASCII doesn't include
On Mon, 13 May 2013 21:17:41 +, Alister wrote:
I would then still write it as not (x == y) to make it clear to myself
avoid any possible confusion although I think that X != Y is much
cleaner.
I think that is sad. If I read not (x == y) I would assume that the
person writing the code
I seem to stumble upon a situation where != operator misbehaves in
python2.x. Not sure if it's my misunderstanding or a bug in python
implementation. Here's a demo code to reproduce the behavior -
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
class
On 5/12/2013 7:23 PM, Mr. Joe wrote:
I seem to stumble upon a situation where != operator misbehaves in
python2.x. Not sure if it's my misunderstanding or a bug in python
implementation. Here's a demo code to reproduce the behavior -
# -*- coding: utf-8 -*-
from __future__ import
Am 13.05.2013 01:23, schrieb Mr. Joe:
I seem to stumble upon a situation where != operator misbehaves in
python2.x. Not sure if it's my misunderstanding or a bug in python
implementation. Here's a demo code to reproduce the behavior -
Python 2.7 doesn't use the negation of __eq__ when your
On Sun, May 12, 2013 at 5:23 PM, Mr. Joe titani...@gmail.com wrote:
I seem to stumble upon a situation where != operator misbehaves in
python2.x. Not sure if it's my misunderstanding or a bug in python
implementation. Here's a demo code to reproduce the behavior -
The != operator is
On 13/05/2013 00:40, Ian Kelly wrote:
On Sun, May 12, 2013 at 5:23 PM, Mr. Joe titani...@gmail.com wrote:
I seem to stumble upon a situation where != operator misbehaves in
python2.x. Not sure if it's my misunderstanding or a bug in python
implementation. Here's a demo code to reproduce the
24 matches
Mail list logo