[Python-ideas] Why is nan != nan?

spir ☣ denis.spir at gmail.com
Thu Mar 25 11:48:00 CET 2010


On Thu, 25 Mar 2010 02:50:41 -0400
Alexander Belopolsky <alexander.belopolsky at gmail.com> wrote:

> Bertrand Meyer again:
> 
> """
> A few of us who had to examine the issue recently think that —
> whatever the standard says at the machine level — a programming
> language should support the venerable properties that equality is
> reflexive and that assignment yields equality.
> """
> 
> IEEE standards were developed in a different problem domain: hardware
> or low level programming language design.   They may not be
> appropriate for an object oriented language like Python.  Java and
> recently Eiffel designers seem to  have realized that.

Hum, should the above be interpreted as:
	a = NAN
==> not only
	a is NAN
but also
	a == NAN

and further:
	b = a
==>
	b == a

?
(Else there should be a distinction between equality assignment and identity assignemt?
	b = a	# ==> a is b and a == b
	b := a	# ==> a is b and possibly a == b
 ;-)

Denis
________________________________

vit esse estrany ☣

spir.wikidot.com



More information about the Python-ideas mailing list