Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'from:addr:python': 0.09; '>>>': 0.12; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'nan': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'reply-to:addr:python-list': 0.16; 'subject:key': 0.16; 'subject:set': 0.16; 'received:84': 0.25; 'to:addr:python-list': 0.33; 'header:User-Agent:1': 0.35; 'reply- to:addr:python.org': 0.35; 'skip:{ 10': 0.35; 'sometimes': 0.39; 'to:addr:python.org': 0.39; 'header:Reply-To:1': 0.72; 'reply- to:no real name:2**0': 0.72 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvcFADKH4U3Unw4S/2dsb2JhbABVhEmTaI4Pd4hxnzKOJI9HgSuDbIEHBJUNil0 Date: Sun, 29 May 2011 00:41:16 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: python-list@python.org Subject: float("nan") in set or as key Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: python-list@python.org List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 11 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306626083 news.xs4all.nl 49184 [::ffff:82.94.164.166]:35826 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6498 Here's a curiosity. float("nan") can occur multiple times in a set or as a key in a dict: >>> {float("nan"), float("nan")} {nan, nan} except that sometimes it can't: >>> nan = float("nan") >>> {nan, nan} {nan}