On Sun, Dec 29, 2019 at 8:00 PM Richard Damon <rich...@damon-family.org> 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? > As me and Uncle Timmy have pointed out, it IS FIXED in sorted(). You just need to call: sorted_stuff = sorted(stuff, key=nan_aware_transform) Guido's time machine to the rescue... you've had this for more than a decade now. -- Keeping medicines from the bloodstreams of the sick; food from the bellies of the hungry; books from the hands of the uneducated; technology from the underdeveloped; and putting advocates of freedom in prisons. Intellectual property is to the 21st century what the slave trade was to the 16th.
_______________________________________________ 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/RGETMDPLAWEP3V55WZGG6J3HO73SLCS6/ Code of Conduct: http://python.org/psf/codeofconduct/