Glenn Linderman <v+pyt...@g.nevcal.com> added the comment:

Bertrand Meyer's exposition is flowery, and he is a learned man, but the basic 
argument he makes is:

Reflexivity of equality  is something that we expect for any data type, and it 
seems hard to justify that a value is not equal to itself. As to assignment, 
what good can it be if it does not make the target equal to the source value?  

The argument is flawed: now that NaN exists, and is not equal to itself in 
value, there should be, and need be, no expectation that assignment elsewhere 
should make the target equal to the source in value.  It can, and in Python, 
should, make them match in identity (is) but not in value (==, equality).

I laud the idea of adding to definition of reflexive equality to the glossary.  
However, I think it is presently a bug that a list containing a NaN value 
compares equal to itself.  Yes, such a list should have the same identity (is), 
but should not be equal.

----------
nosy: +v+python

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11945>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to