[docs] [issue11945] Adopt and document consistent semantics for handling NaN values in containers

Terry J. Reedy report at bugs.python.org
Thu Apr 28 21:30:32 CEST 2011


Terry J. Reedy <tjreedy at udel.edu> added the comment:

To repeat concisely what I said on pydev list, I think Reference 5.9. Comparisons, which says

"Tuples and lists are compared lexicographically using comparison of corresponding elements. This means that to compare equal, each element must compare equal and the two sequences must be of the same type and have the same length.".

needs 'be indentical or ' added before 'compare equal and ...'

"Mappings (dictionaries) compare equal if and only if they have the same (key, value) pairs."

may be ok, depending on how one interprets 'same (key, value) pairs'.

Alexander has opened a separate issue to change behavior in 3.3.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11945>
_______________________________________


More information about the docs mailing list