This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author joel.larose
Recipients joel.larose
Date 2021-06-10.02:13:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623291204.03.0.627451843558.issue44370@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-06-10 02:13:24joel.larosesetrecipients: + joel.larose
2021-06-10 02:13:24joel.larosesetmessageid: <1623291204.03.0.627451843558.issue44370@roundup.psfhosted.org>
2021-06-10 02:13:24joel.laroselinkissue44370 messages
2021-06-10 02:13:23joel.larosecreate