Joël Larose <joel.lar...@gmail.com> added the comment: The same problem occurs if the argument is a `list`. The same inconsistency happens depending on the position in the list that `nan` happens to be.
>>> max([5, nan, 3, 0, 8, -10]) 8 >>> min([5, nan, 3, 0, 8, -10]) -10 >>> min([nan, 5, 3, 0, 8, -10]) nan >>> max([nan, 5, 3, 0, 8, -10]) nan Passing a `tuple` with the same values produces the same inconsistency. For the examples above, replacing the lists with sets with the same values (i.e. replace [] with {}) always results in `nan`. This may have to do with the hash value of `nan` always making the first value in iteration be `nan` given the sample space. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44370> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com