On Sun, Dec 29, 2019 at 07:59:26PM -0500, Richard Damon wrote:

> Which is EXACTLY the reason I say that if this is important enough to 
> fix in median, it is important enough to fix in sorted. sorted gives 
> exactly the same nonsense result, it is only a bit more obvious because 
> it gives all the points. Is [3, nan, 1, 2, 4] a sorted list?

Mu.

https://en.wikipedia.org/wiki/Mu_%28negative%29#%22Unasking%22_the_question

>From one perspective, the very concept of a linear smallest to biggest 
order is incoherent when you have a partial order (a little like asking 
which is the strongest out of Rock, Paper, Scissors[1]:

    Rock beats Scissors
    Scissors beats Paper
    Paper beats Rock

so there is no linear arrangement of [Paper, Scissors, Rock] that 
satisfies the order. Any linear arrangement is "not sorted" by that 
definition.

But another perspective is that, yes, it is sorted:

    Paper is beaten by Scissors, so it goes before Scissors;
    Scissors is beaten by Rock, so it goes before Rock

and the ordering relations are satisfied. In your example:

    3 is no bigger than NAN, so it goes before NAN;
    NAN is no bigger than 1, so it goes before 1;
    1 is no bigger than 2, so it goes before 2
    2 is no bigger than 4, so it goes before 4;

giving the order [3, NAN, 1, 2, 3] and all the ordering relations are 
satisfied. (Just don't ask about *other* ordering relations.)



[1] "Good ol' Rock always wins."


-- 
Steven
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/IZU6EEA5W4OH2XYZV54GW6N2ON57O27A/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to