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


Groups > comp.lang.python > #86968

Re: Is nan in (nan,) correct?

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.049
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'cc:addr:python-list': 0.11; '754': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'nan': 0.16; 'wrote:': 0.18; 'obviously': 0.18; '>>>': 0.22; 'example': 0.22; 'python?': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'fri,': 0.33; 'subject: (': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'mar': 0.68; 'subject': 0.69; '2015': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=VQSpCP8fiWZuqzj6uy7AEieCI//temfsQ2Ac4UQB1OI=; b=EZrTDXJe8PkQ0zUtPFwYw5JehkEA9tE2A95spkJ19pNrMwR/nzq4ezUyNSzJoDKcP0 YNX5ji0xBDm5VORrW+NPC8tfjLhR4gwsHnHjH4GIwzPDOjDNXerdEvSk4Fo/auIb+j9/ aFYtO7oi2E7CNMVnujmL1Xo2wlpzkPXyCHOwIm0cWZfg1n17k1qSeAI8j37tioMdz2Vk QXxo7vVY/CXif2zWKsHSTn866I1n2v/n+soNIMC+Nrs8CZH2k3ctQEfaOQs38qPzokTM AOSEGxvuPreytYp0lHf/9hk6vA/7ltC0Aekks7g5Rep+I+ZsTOZrLu14yzCDxyQjAJju 1RPw==
MIME-Version 1.0
X-Received by 10.107.136.14 with SMTP id k14mr8550571iod.53.1425598819979; Thu, 05 Mar 2015 15:40:19 -0800 (PST)
In-Reply-To <5cfab73a-ec0b-488b-8787-72e7640dc352@googlegroups.com>
References <mailman.67.1425594415.21433.python-list@python.org> <eb903edb-6400-4a61-8d79-e8a8535443e7@googlegroups.com> <mailman.70.1425597600.21433.python-list@python.org> <5cfab73a-ec0b-488b-8787-72e7640dc352@googlegroups.com>
Date Fri, 6 Mar 2015 10:40:19 +1100
Subject Re: Is nan in (nan,) correct?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.19
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.73.1425598822.21433.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1425598822 news.xs4all.nl 2882 [2001:888:2000:d::a6]:33299
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:86968

Show key headers only | View raw


On Fri, Mar 6, 2015 at 10:27 AM,  <sohcahtoa82@gmail.com> wrote:
> Do you have an example of where `a is b` but `a != b` in Python?  `None == None` is True.

Check out the subject line.

>>> nan = float("nan")
>>> nan is nan  # obviously
True
>>> nan != nan  # IEEE 754 mandates
True

ChrisA

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


Thread

Is nan in (nan,) correct? random832@fastmail.us - 2015-03-05 17:26 -0500
  Re: Is nan in (nan,) correct? sohcahtoa82@gmail.com - 2015-03-05 15:11 -0800
    Re: Is nan in (nan,) correct? Ben Finney <ben+python@benfinney.id.au> - 2015-03-06 10:20 +1100
      Re: Is nan in (nan,) correct? sohcahtoa82@gmail.com - 2015-03-05 15:27 -0800
        Re: Is nan in (nan,) correct? Ben Finney <ben+python@benfinney.id.au> - 2015-03-06 10:39 +1100
        Re: Is nan in (nan,) correct? Chris Angelico <rosuav@gmail.com> - 2015-03-06 10:40 +1100
    Re: Is nan in (nan,) correct? Chris Angelico <rosuav@gmail.com> - 2015-03-06 10:25 +1100
  Re: Is nan in (nan,) correct? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-06 13:09 +1100
    Re: Is nan in (nan,) correct? Ben Finney <ben+python@benfinney.id.au> - 2015-03-06 13:55 +1100
    Re: Is nan in (nan,) correct? Ethan Furman <ethan@stoneleaf.us> - 2015-03-05 19:18 -0800
    Re: Is nan in (nan,) correct? Ben Finney <ben+python@benfinney.id.au> - 2015-03-06 14:26 +1100
    Re: Is nan in (nan,) correct? Ethan Furman <ethan@stoneleaf.us> - 2015-03-05 19:44 -0800
    Re: Is nan in (nan,) correct? Chris Angelico <rosuav@gmail.com> - 2015-03-06 14:49 +1100
    Re: Is nan in (nan,) correct? random832@fastmail.us - 2015-03-05 23:37 -0500
      Re: Is nan in (nan,) correct? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-07 04:07 +1100
    Re: Is nan in (nan,) correct? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-06 04:46 +0000
  Re: Is nan in (nan,) correct? Rustom Mody <rustompmody@gmail.com> - 2015-03-06 01:50 -0800
    Re: Is nan in (nan,) correct? Chris Angelico <rosuav@gmail.com> - 2015-03-06 21:01 +1100
      Re: Is nan in (nan,) correct? Rustom Mody <rustompmody@gmail.com> - 2015-03-06 02:22 -0800
        Re: Is nan in (nan,) correct? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-07 03:59 +1100
          Re: Is nan in (nan,) correct? Rustom Mody <rustompmody@gmail.com> - 2015-03-06 10:04 -0800
            Re: Is nan in (nan,) correct? Ethan Furman <ethan@stoneleaf.us> - 2015-03-06 10:16 -0800
      Re: Is nan in (nan,) correct? Grant Edwards <invalid@invalid.invalid> - 2015-03-06 15:34 +0000
    Re: Is nan in (nan,) correct? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-07 03:43 +1100
      Re: Is nan in (nan,) correct? Rustom Mody <rustompmody@gmail.com> - 2015-03-06 09:04 -0800
        Re: Is nan in (nan,) correct? Chris Angelico <rosuav@gmail.com> - 2015-03-07 04:16 +1100
          Re: Is nan in (nan,) correct? Rustom Mody <rustompmody@gmail.com> - 2015-03-06 09:36 -0800
        Re: Is nan in (nan,) correct? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-07 10:33 +1100
          Re: Is nan in (nan,) correct? Rustom Mody <rustompmody@gmail.com> - 2015-03-06 18:37 -0800

csiph-web