Message395501
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. |
|
Date |
User |
Action |
Args |
2021-06-10 02:13:24 | joel.larose | set | recipients:
+ joel.larose |
2021-06-10 02:13:24 | joel.larose | set | messageid: <1623291204.03.0.627451843558.issue44370@roundup.psfhosted.org> |
2021-06-10 02:13:24 | joel.larose | link | issue44370 messages |
2021-06-10 02:13:23 | joel.larose | create | |
|