Marco Sulla <launchpad....@marco.sulla.e4ward.com> added the comment:

> No idea what "are minor that another object" could possibly mean.

Oh my god... a < b?

> I don't know what purpose would be served by checking ">=" too

Well, it's very simple. Since the sorting algorithm checks if a < b, if this 
check fails, I propose to check also a >= b. If this is false too, the iterable 
contains an unorderable object. From this point, the check will never done 
again, an unorderable object is sufficient to raise the warning.

The check a >= b is *not* for ordering the iterable, is only for checking if 
the elements are orderable or not, and raise the warning.

Furthermore, I suppose that if someone is sure that its iterable is 
unorderable-free and want a fine-grained boost to speed, a flag can added. If 
true, sorting will not use the algorithm with the check, but the old algorithm.

> You haven't addressed any of the points he (Dickinson) raised

Dickinson said you have to check for total preorder. If you have understood my 
idea, this is not needed at all.

----------

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

Reply via email to