comparison with None

Tommy Grav tgrav at mac.com
Fri Apr 20 08:42:43 EDT 2007


On Apr 19, 2007, at 11:00 PM, Alex Martelli wrote:

> Alan Isaac <aisaac at american.edu> wrote:
>
>> currently documented behavior:
>> "objects of different types always compare unequal".
>
> Where is that documented?  URL please?
>
>>>> 1.0 == 1
> True
>>>> type(1.0), type(1)
> (<type 'float'>, <type 'int'>)
>

Isn't this an example of numerical comparison (= or !=) versus
object comparison (is or is not). I think the documentation needs
to state that there is a difference between the two types.

Cheers
    Tommy



More information about the Python-list mailing list