On Mon, 8 Apr 2019 at 10:34, Steven D'Aprano <st...@pearwood.info> wrote: > The median (and soon, quantiles) API says: > > I'm going to sort the list for you, whether you need it or > not, just in case you do.
Hmm, I didn't see that mentioned in the docs. It makes a difference to my comment about behaviour change, I think. > It could become: > > I'm going to sort the list for you, if necessary. If you > lie about it already being sorted, you'll get garbage. But regardless, this would be the same potential behaviour change I mentioned. (In the actual docs, it should probably be explicit about the sort order, as someone who passes a list sorted in the wrong way might not *think* they were lying, just that they hadn't sorted the list... Still not convinced this is safe enough to be worth it ;-) 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/