None in comparison

r.grimm at science-computing.de r.grimm at science-computing.de
Fri Jul 18 02:52:13 EDT 2008


Hello,
I'm a little confused about None in comparison.

>>> id ( None )
3086100672L
>>> id ( 1 )
134541104
>>> None < 1
True
>>>

I thought, the id of the object is the last comparison criterion.
Therefore, None must be greater then 1.
Where is the behaviour of the comparison defined?. In the __cmp__ of
int. Or in the global cmp Function?

Thanks in advance
Rainer



More information about the Python-list mailing list