a.index(float('nan')) fails

Terry Reedy tjreedy at udel.edu
Fri Oct 26 14:58:29 EDT 2012


On 10/26/2012 12:23 PM, Steven D'Aprano wrote:
> On Fri, 26 Oct 2012 04:00:03 -0400, Terry Reedy wrote:

>> This inconsistency is an intentional decision to
>> not propagate the insanity of nan != nan to Python collections.
>
> That's a value judgement about NANs which is not shared by everyone.
>
> Quite frankly, I consider it an ignorant opinion about NANs, despite what
> Bertrand Meyer thinks. Reflectivity is an important property, but it is
> not the only important property and it is not even the most important
> property of numbers.

Reflexivity is one of the definitional properties of the mathematical 
equality relationship and of equivalence relationships in general. It is 
not specific to numbers. It is assumed by the concept and definition of 
sets.

-- 
Terry Jan Reedy




More information about the Python-list mailing list