Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:not': 0.03; "subject:' ": 0.07; 'function:': 0.09; 'python': 0.11; '"is"': 0.16; '-tkc': 0.16; '2.7.3': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'trivially': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'charset:us-ascii': 0.36; 'example,': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'more': 0.64; 'mar': 0.68; '2014,': 0.84; 'received:50.22': 0.84 Date: Tue, 19 Aug 2014 12:34:00 -0500 From: Tim Chase To: python-list@python.org Subject: Re: 'is not' or '!=' In-Reply-To: <8761ho75gv.fsf@elektro.pacujo.net> References: <87fvgt7c4i.fsf@elektro.pacujo.net> <53F27340.90604@stoneleaf.us> <8761ho75gv.fsf@elektro.pacujo.net> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1408469734 news.xs4all.nl 2870 [2001:888:2000:d::a6]:47995 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:76582 On 2014-08-19 20:29, Marko Rauhamaa wrote: > The "is" relation can be defined trivially through the id() > function: > > X is Y iff id(X) == id(Y) > > What remains is the characterization of the (total) id() function. > For example, we can stipulate that: > > X = Y > assert(id(X) == id(Y)) Note that a lifetime can be less than a statement: $ python Python 2.7.3 (default, Mar 13 2014, 11:03:55) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> id([1,2,3]) == id([4,5,6]) True -tkc