Interesting list Validity (True/False)

Carsten Haese carsten at uniqsys.com
Sun May 13 15:09:46 EDT 2007


On Sun, 2007-05-13 at 09:26 -0700, mensanator at aol.com wrote:
> > The statement I made is simply the meaning of "if arg==True" by
> > definition, so I don't see how it can be nonsensical.
> 
> Because you didn't allow for exceptions, which are
> prominently pointed out in the Python docs.

I said: "if arg==True" tests whether the object known as arg is equal to
the object known as True. There are no exceptions. "==" means "equal",
period! Your problem is that Python's notion of "equal" is different
from your notion of "equal".

> > The problem is that you consider equality tests in Python to be
> > nonsensical because they don't fit with your opinion of what equality
> > should mean.
> 
> No, it has nothing to do with what it means. 1, [1], (1,)
> and mpz(1) are all different types and all mathmatically
> the same. Yet 1 and mpz(1) compare equal but (1,) and
> [1] do not.

And that just proves my point. You insist on the notion that equality
means "mathematically the same". Python's equality tests sometimes work
out that way, but that's not how equality actually works, nor how it is
actually defined in Python.

Regards,

-- 
Carsten Haese
http://informixdb.sourceforge.net





More information about the Python-list mailing list