On Tue, Mar 23, 2010 at 6:07 PM, Adam Olsen <rha...@gmail.com> wrote: > On Tue, Mar 23, 2010 at 12:04, Mark Dickinson <dicki...@gmail.com> wrote: >> Note that containment tests check identity before equality, so there's >> no problem with putting (float) nans in sets or dicts: >> >>>>> x = float('nan') >>>>> s = {x} >>>>> x in s >> True > > Ergh, I thought that got changed. Nevermind then.
Hmm. I think you're right: it did get changed at some point early in py3k's history; I seem to recall that the identity-checking behaviour got restored before 3.1 was released, though. There was an issue about this somewhere, but I'm failing to find it. Mark _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com