On Wed, Apr 3, 2013 at 5:52 AM, Dave Angel <da...@davea.name> wrote:
> I'm also puzzled.  I thought that the sort algorithm used a hash of all the
> items to be sorted, and only reverted to a raw comparison of the original
> values when the hash collided.  Is that not the case?  Or is the code you
> post here only used when the hash collides?

I think you are mistaken, because I don't see how that could work.  If
the hashes of two items are different then you can assume they are not
equal, but sorting requires a partial ordering comparison, not simply
an equality comparison.  You cannot determine which item is less or
greater than the other from the hash values alone.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to