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: 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: References: <54f9d93a$0$12981$c3e8da3$5496439d@news.astraweb.com> Date: Sat, 7 Mar 2015 04:16:44 +1100 Subject: Re: Is nan in (nan,) correct? From: Chris Angelico Cc: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Sat, Mar 7, 2015 at 4:04 AM, Rustom Mody 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