Re: Interesting list Validity (True/False)



On Mon, 2007-05-14 at 11:41 -0700, mensanator@xxxxxxx wrote:
On May 13, 8:24 am, Steven D'Aprano
<s...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
On Sat, 12 May 2007 21:50:12 -0700, mensana...@xxxxxxx wrote:
<quote>
"if arg==True" tests whether the object known as arg is equal to the
object known as True.
</quote>

Not at all, it makes perfect sense. X == Y always tests whether the
argument X is equal to the object Y regardless of what X and Y are.

Except for the exceptions, that's why the statement is wrong.

But there are no exceptions.

<quote emphasis added>
Sec 2.2.3:
Objects of different types, *--->except<---* different numeric types
and different string types, never compare equal;
</quote>

The exceptions you mean are not exceptions to "'X==Y' means 'X equals
Y'". They are exceptions to "'X equals Y' means 'X is mathematically the
same as Y'," but that is not how equality is actually defined.

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


.



Relevant Pages

  • Re: COUNTIF help
    ... I am trying to cound the number of times the exceptions are ">0" for each ... Each row is a loan. ... persons initials in a range in column "D" equals their initials. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Interesting list Validity (True/False)
    ... The exceptions you mean are not exceptions to "'X==Y' means 'X equals ... "Obbjects of different types never compare equal". ... The exceptions being different numeric types and different string types, that have a special treatment; see section 5.9 in the Reference Manual for details." ...
    (comp.lang.python)
  • Re: Interesting list Validity (True/False)
    ... The exceptions you mean are not exceptions to "'X==Y' means 'X equals ... "Obbjects of different types never compare equal". ... Are you implying that I can't interchange and ...
    (comp.lang.python)
  • Re: Strange exceptions in ASP.NET + COM application
    ... I check the returm value and ... it always equals to 0. ... Exceptions are still here. ... help to avoid the problem, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Exception handling
    ... > checking and exceptions, ... preferring an abend (which can NOT necessarily be reproduced, regardless of ... just add a macro for line and file to the error statement ...
    (comp.lang.cpp)