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 brandtbucher
Recipients brandtbucher, cheryl.sabella, mark.dickinson, rhettinger, serhiy.storchaka, tim.peters
Date 2019-02-23.23:45:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550965528.04.0.511342772121.issue36095@roundup.psfhosted.org>
In-reply-to
Content
Thanks for the feedback. I agree with you on the iffy delegation issue. However, this is problem that I feel deserves a fix... the behavior (silently producing garbage results) is just so un-pythonic. It’s been made clear in other issues that a warning isn’t right here, and sorting is guaranteed to use __lt__ (which NaN defines well for use in all other contexts). I honestly don’t see any other way. If that means fixing min, max, and friends too, I think it’s worth it.

Special cases justify special-casing, especially when doing so doesn’t break the rules. NaN isn’t like any other value of any other type; It’s practically defined by its ability to ruin valid comparison operations, even with fellow floats, for which ordering is otherwise well-defined.

For what it’s worth, I don’t know if anybody who’s tried to sort sets. Every Python programmer I know has blindly sorted floats at some point.
History
Date User Action Args
2019-02-23 23:45:28brandtbuchersetrecipients: + brandtbucher, tim.peters, rhettinger, mark.dickinson, serhiy.storchaka, cheryl.sabella
2019-02-23 23:45:28brandtbuchersetmessageid: <1550965528.04.0.511342772121.issue36095@roundup.psfhosted.org>
2019-02-23 23:45:28brandtbucherlinkissue36095 messages
2019-02-23 23:45:27brandtbuchercreate