[Python-Dev] cmp(x,x) (original) (raw)

Greg Ewing greg at cosc.canterbury.ac.nz
Sun May 23 20:40:21 EDT 2004


Gustavo Niemeyer <niemeyer at conectiva.com>:

Is it true that the current list comparison algorithm goes trough every element doing identity comparison, and if every element in the first list is the element at the same position in the second list, and the list has the same size, then lists are considered equal?

If that's true, then I belive there's no reason for not comparing if the first list is the second list at the top of listrichcompare(), right?

What if the list contains a NaN?

Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+



More information about the Python-Dev mailing list