On Sun, Apr 7, 2019 at 7:37 PM Steven D'Aprano <st...@pearwood.info> wrote:
> There are quite a few important algorithms which require lists to be
> sorted. For example, the bisect module, and for statistics median and
> other quantiles.

But this flag doesn't affect those modules, right? 'bisect' already
requires the user to ensure that the list is sorted appropriately, and
this bit:

> The flag doesn't guarantee that the list is sorted the way you want
> (e.g. biggest to smallest, by some key, etc) only that it has been
> sorted. Its up to the user to ensure they sort it the right way:

...seems to mean that the 'statistics' module can't use this flag either.

It doesn't seem very likely to me that the savings from this flag
could outweigh the extra overhead it introduces, just because list
operations are *so* common in Python. If you want to push this
forward, the thing I'd most like to see is some kind of measurements
to demonstrate that average programs will benefit.

-n

-- 
Nathaniel J. Smith -- https://vorpus.org
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to