This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Marco Sulla
Recipients Marco Sulla, brandtbucher, cheryl.sabella, mark.dickinson, rhettinger, serhiy.storchaka, tim.peters
Date 2019-12-15.22:19:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576448399.33.0.588870477753.issue36095@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2019-12-15 22:19:59Marco Sullasetrecipients: + Marco Sulla, tim.peters, rhettinger, mark.dickinson, serhiy.storchaka, cheryl.sabella, brandtbucher
2019-12-15 22:19:59Marco Sullasetmessageid: <1576448399.33.0.588870477753.issue36095@roundup.psfhosted.org>
2019-12-15 22:19:59Marco Sullalinkissue36095 messages
2019-12-15 22:19:59Marco Sullacreate