Xiang Zhang added the comment: Caleb's resolution looks good, just like the C version does, at least seems correct.
Serhiy, the corner case is interesting. math.nan == math.nan should return false so I think (1, math.nan) in ItemsView({1: math.nan} is a right behaviour. But the C version, which calls PyObject_RichCompareBool and then do a pointer check first seems having some problem. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24434> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com