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


Groups > comp.lang.python > #87048

Re: Is nan in (nan,) correct?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.042
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'assuming': 0.09; 'function,': 0.09; 'cc:addr:python-list': 0.11; 'def': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'identities.': 0.16; 'nans': 0.16; 'sat,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'either.': 0.24; 'membership.': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'you?': 0.31; 'container': 0.31; 'subject: (': 0.35; 'no,': 0.35; 'one,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'should': 0.36; 'enough': 0.39; "you've": 0.63; 'different': 0.65; 'dont': 0.67; 'mar': 0.68; 'optimized': 0.68; '2015': 0.84; 'to:none': 0.92; 'imagine': 0.93
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=vpGZbasfpQ6pGNwSWdBMMyNf9+soHJMbpUzlT0ugsIw=; b=EOI2LdE2VSZAAniZHWhCE6fedlY6qv7y+G/Z9x10QFwQ8NP7rFDb3ArtOunTcklLK5 aBLug1s/gwc4Fn0TiJNjJKgITL+LRqHEWr4nMOcpZsdSeADWXUfZumgozEy4QvLOLNMQ ukIpZbnV2dmmIxdtswYo8OaqOW6Le6UvT+jWpm4u3HuXE0I5QlKkU8+A5yEyosIV4Pso wBIo1odgrpbVE0p4s4t1efEG0MZgdhqhTQZ4m2UJ/jOK16DXCA94GPzuPi+ge/1XlE4T 9uMcBfge1xYS8nLZnSTkGVGUI2rSE0Ra7G0cK/CX0WlJNjGj1ZJRGtpsEe+NoQmRGemw SzkQ==
MIME-Version 1.0
X-Received by 10.50.79.161 with SMTP id k1mr29257484igx.14.1425662204268; Fri, 06 Mar 2015 09:16:44 -0800 (PST)
In-Reply-To <c24cc0a9-4cc7-42a9-901a-3d19e4b1c6e2@googlegroups.com>
References <mailman.67.1425594415.21433.python-list@python.org> <dd9a23e8-39fc-4a1f-87f1-d2edbcc3e0e6@googlegroups.com> <54f9d93a$0$12981$c3e8da3$5496439d@news.astraweb.com> <c24cc0a9-4cc7-42a9-901a-3d19e4b1c6e2@googlegroups.com>
Date Sat, 7 Mar 2015 04:16:44 +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.123.1425662206.21433.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1425662206 news.xs4all.nl 2894 [2001:888:2000:d::a6]:38075
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:87048

Show key headers only | View raw


On Sat, Mar 7, 2015 at 4:04 AM, Rustom Mody <rustompmody@gmail.com> wrote:
> You dont grok your theory of computation very well do you?
>
> def foo(x): return x + x
> def bar(x): return x + x
> def baz(x): return 2*x
>
> One can imagine an implementation where
> id(foo) == id(bar)
> [I am assuming that id is a good enough approx to bit_representation]
>
> Can you imagine an implementation where
> id(bar) == id(baz)
> ?

No, I cannot imagine either. Those functions have different
identities. They may be considered *equal* but they should not be
*identical*. I can imagine a language in which they are considered
indistinguishable and optimized down to one, but if you consider them
to be the same function, then you've abolished all concept of
identity.

Also, I have no idea what any of this has to do with nans and
container membership.

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