Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6518

Re: float("nan") in set or as key

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <wolfgang@rohdewald.de>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'received:localnet': 0.07; 'python': 0.08; 'python-dev,': 0.09; 'wrote:': 0.14; 'dictionaries': 0.16; 'equality': 0.16; 'from:addr:rohdewald.de': 0.16; 'from:addr:wolfgang': 0.16; 'from:name:wolfgang rohdewald': 0.16; 'message-id:@rohdewald.de': 0.16; 'received:91.62': 0.16; 'reply-to:addr:rohdewald.de': 0.16; 'reply-to:addr:wolfgang': 0.16; 'subject:key': 0.16; 'subject:set': 0.16; 'wolfgang': 0.16; 'header:In-Reply-To:1': 0.21; 'assume': 0.23; '(and': 0.25; 'specified': 0.26; 'discussed': 0.29; 'second': 0.30; 'received:mo-p00-ob.rzone.de': 0.30; 'equal': 0.31; 'to:addr :python-list': 0.33; 'things': 0.33; 'header:User-Agent:1': 0.35; 'implies': 0.35; 'charset:us-ascii': 0.36; 'thread': 0.37; 'reasons': 0.37; 'think': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'itself.': 0.39; 'sets': 0.39; 'to:addr:python.org': 0.39; 'header :Message-Id:1': 0.62; 'header:Reply-To:1': 0.72; 'reply-to:no real name:2**0': 0.72; 'delaney': 0.84; 'edwards': 0.91; 'mystery': 0.96
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; t=1306657636; l=588; s=domk; d=rohdewald.de; h=Content-Transfer-Encoding:Content-Type:MIME-Version:In-Reply-To: References:Date:Subject:To:Reply-To:From:X-RZG-CLASS-ID:X-RZG-AUTH; bh=RCeoA0YcN1C/I80qRGslRkx8dOU=; b=odtROLed+IPgCa1TcBvqjwefuxSUlwgQbP0m8F5C6upi1ycUBNpKtwGebD8O49Dw3bz 765t7WqF4Z/J7jP49DUjRXViNhIhFuWmtetM2cAxQix8UZJDF6+n+lOlB8L+iUfPJBAqM Sryaw9a9axgzgCTx6av7jK96FyS/Ylz8N6g=
X-RZG-AUTH :O2MIc0epdfgAjoV+frHI3UhxNCLBO5P+YS73lHhJYRD2uAuzaM+5N8MTpurqLXil
X-RZG-CLASS-ID mo00
From Wolfgang Rohdewald <wolfgang@rohdewald.de>
To python-list@python.org
Subject Re: float("nan") in set or as key
Date Sun, 29 May 2011 10:27:14 +0200
User-Agent KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.3; x86_64; ; )
References <4DE1881C.8000701@mrabarnett.plus.com> <mailman.2207.1306628936.9059.python-list@python.org> <irsarj$2b9$1@reader1.panix.com>
In-Reply-To <irsarj$2b9$1@reader1.panix.com>
MIME-Version 1.0
Content-Type Text/Plain; charset="us-ascii"
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To wolfgang@rohdewald.de
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2215.1306657864.9059.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 82.94.164.166
X-Trace 1306657864 news.xs4all.nl 49183 [::ffff:82.94.164.166]:53755
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:6518

Show key headers only | View raw


On Sonntag 29 Mai 2011, Tim Delaney wrote:
> There's a second part the mystery - sets and dictionaries (and
> I think lists) assume that identify implies equality (hence
> the second result). This was recently discussed on
> python-dev, and the decision was to leave things as-is.

On Sonntag 29 Mai 2011, Grant Edwards wrote:
> Even if they are the same nan, it's still not equal to itself.

if I understand this thread correctly, they are not equal to
itself as specified by IEEE but Python treats them equal in
sets and dictionaries for performance reasons

-- 
Wolfgang

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: float("nan") in set or as key Albert Hopkins <marduk@letterboxes.org> - 2011-05-28 20:28 -0400
  Re: float("nan") in set or as key Erik Max Francis <max@alcyone.com> - 2011-05-28 17:44 -0700
  Re: float("nan") in set or as key Grant Edwards <invalid@invalid.invalid> - 2011-05-29 02:25 +0000
    Re: float("nan") in set or as key Wolfgang Rohdewald <wolfgang@rohdewald.de> - 2011-05-29 10:27 +0200
      Re: float("nan") in set or as key Grant Edwards <invalid@invalid.invalid> - 2011-05-29 14:41 +0000
        Re: float("nan") in set or as key MRAB <python@mrabarnett.plus.com> - 2011-05-29 18:44 +0100
          Re: float("nan") in set or as key Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-29 18:27 +0000
        Re: float("nan") in set or as key Chris Angelico <rosuav@gmail.com> - 2011-05-30 03:50 +1000
        Re: float("nan") in set or as key Christian Heimes <lists@cheimes.de> - 2011-05-29 20:05 +0200
          Re: float("nan") in set or as key Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-29 18:46 +0000
        Re: float("nan") in set or as key Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-05-29 20:36 -0700

csiph-web