comparison with None

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Fri Apr 20 15:20:55 EDT 2007


En Fri, 20 Apr 2007 11:40:00 -0300, Alex Martelli <aleax at mac.com> escribió:

> I'm still interested to know where that erroneous quote from Alan Isaac
> comes from, because if it's in Python's docs, it can be fixed.

It was a partial quote, that's why it appeared to be wrong:

Library reference, 3.3 Comparisons

"Objects of different types, except different numeric types and different  
string types, never compare equal; such objects are ordered consistently  
but arbitrarily."

Reference Manual, 5.9 Comparisons

"The objects need not have the same type. If both are numbers, they are  
converted to a common type. Otherwise, objects of different types always  
compare unequal, and are ordered consistently but arbitrarily."

(Apart from the latter not menctioning string types too, looks good to me).

-- 
Gabriel Genellina



More information about the Python-list mailing list