Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.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.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'cpython': 0.05; '*not*': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'address).': 0.16; 'corrupt': 0.16; 'definition.': 0.16; 'finney': 0.16; 'foolishly': 0.16; "object's": 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'language': 0.16; 'written': 0.21; 'memory': 0.22; 'header:User-Agent:1': 0.23; '(by': 0.24; 'header:X-Complaints-To:1': 0.27; 'function': 0.29; "doesn't": 0.30; 'code': 0.31; 'consequence': 0.31; "d'aprano": 0.31; 'fault': 0.31; 'implied': 0.31; 'steven': 0.31; 'writes:': 0.31; 'could': 0.34; 'agree': 0.35; 'except': 0.35; 'there': 0.35; 'false': 0.36; 'received:com.au': 0.36; 'returning': 0.36; 'yours,': 0.36; 'ben': 0.38; 'to:addr:python-list': 0.38; 'bad': 0.39; 'to:addr:python.org': 0.39; 'address.': 0.39; 'received:org': 0.40; "you've": 0.63; 'compliant': 0.68; 'equals': 0.68; 'break.': 0.84; 'received:125': 0.84; 'mistakenly': 0.91; 'youth': 0.91; '\xe2\x80\x9cthe': 0.91; 'imagine': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Reference Date: Thu, 06 Mar 2014 08:01:21 +1100 References: <53144e8d$0$2149$426a74cc@news.free.fr> <1d1dfa1b-b715-4d8f-9c12-f0d3dc1a22c9@googlegroups.com> <85ppm3httu.fsf@benfinney.id.au> <20140303155112.46e34ff8@bigbox.christie.dr> <87siqy7whs.fsf@elektro.pacujo.net> <53155c15$0$2923$c3e8da3$76491128@news.astraweb.com> <164d209c-ba5e-449f-bc25-c27ebfb1fc0f@googlegroups.com> <5316b0dc$0$2923$c3e8da3$76491128@news.astraweb.com> <53176cfe$0$29985$c3e8da3$5496439d@news.astraweb.com> <87mwh475bc.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: vmx15867.hosting24.com.au X-Public-Key-ID: 0xBD41714B X-Public-Key-Fingerprint: 9CFE 12B0 791A 4267 887F 520C B7AC 2E51 BD41 714B X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-gpg.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:lwz/falvcj0NOiMUlkztlvsr9ZY= 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1394053296 news.xs4all.nl 2830 [2001:888:2000:d::a6]:54188 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67877 Marko Rauhamaa writes: > Steven D'Aprano : > > Both the Jython and CPython id() functions are compliant with the > > language definition. The Jython id() function is better, because it > > doesn't encourage people to mistakenly and foolishly imagine that > > id() equals address. > > I agree with everything (how could I not) except the foolishness part: > what bad consequence is there for "imagining" that id() equals > address? It is a false inference. A reference-compliant implementation can contradict your inference (by returning an object identity that is *not* the object's memory address). Any code you've written based on that false inference will break. The fault will be yours, for inferring an assertion that isn't implied by the definition. -- \ “The surest way to corrupt a youth is to instruct him to hold | `\ in higher esteem those who think alike than those who think | _o__) differently.” —Friedrich Nietzsche, _The Dawn_, 1881 | Ben Finney