On Mon, 8 Apr 2019 at 11:27, Steven D'Aprano <st...@pearwood.info> wrote: > > Fair enough, but does it help you feel a bit better about the feature if > we called it a "sort hint", and emphasized that it should only be used > in the same sort of APIs where you might allow the caller to pass > > already_sorted=True > > to skip a redundant sort step?
Not really, because already_sorted=True is an explicit claim by the user, whereas the (internally maintained) dunder attribute is the interpreter maintaining a (not guaranteed reliable but pessimistic to be as safe as possible) view on whether the data is sorted. But I see elsewhere in the thread that you're now more inclined towards an explicit already_sorted flag, so I won't labour the point. Paul _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/