Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: NaN comparisons - Call For Anecdotes Date: Tue, 08 Jul 2014 20:31:25 +0300 Organization: A noiseless patient Spider Lines: 13 Message-ID: <871ttvahaq.fsf@elektro.pacujo.net> References: <53BC05FB.4050707@jmunch.dk> <878uo3akqy.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx05.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="3991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jRzXulOQ+ppql8YPjXA/G" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:qtChE4HTWEkuY4IbpqlM4THAIy4= sha1:HuE2Hgzy9uEMClKXfTmijPt6uvc= Xref: csiph.com comp.lang.python:74189 Chris Angelico : > I'd say it would surprise people rather a lot if operations like dict > insertion/lookup could trigger arithmetic exceptions. :) That wouldn't trigger exceptions. Dict operations do an "is" test before an "==" test. In fact, you couldn't even use NaN as a dict key otherwise. Thus, dict operations never test NaN == NaN. Marko