Sorting NaNs

Peter J. Holzer hjp-python at hjp.at
Sat Jun 2 11:28:28 EDT 2018


On 2018-06-02 10:40:48 +0000, Steven D'Aprano wrote:
> On Sat, 02 Jun 2018 09:32:05 +0200, Peter J. Holzer wrote:
> > Also nope. It looks like NaNs just mess up sorting in an unpredictable
> > way. Is this the intended behaviour or just an accident of
> > implementation? (I think it's the latter: I can see how a sort algorithm
> > which doesn't treat NaN specially would produce such results.)
> 
> 
> Neither -- it is a deliberate decision

If it was a deliberate decicion I would say it was intentional.

        hp

-- 
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp at hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20180602/75471622/attachment.sig>


More information about the Python-list mailing list